使用Eclipse 将EJB 和 调用此EJB的JSP或SERVLET部署到JBoss4.0.2中,使用LOMBOZ EJB Test Client Wizard 创建的JAVA客户端可以正常调用EJB,但使用Servlet和JSP调用时出错:
04:03:33,714 INFO [STDOUT] java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract test.ejb.TestEJBInterface test.ejb.TestEJBHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
解决办法:
1] Edit conf/jboss-service.xml and make CallByValue as 'true' in NamingService as below
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
true
2] Edit deploy/ear-deployer.xml, and set Isloated and CallByValue as true
3]Edit deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml , and set Java2ClassLoadingCompilance and UseJbossWebLoader attributes as false
http://www.jboss.com/?module=bb&op=viewtopic&p=3882728