EJBException: Invalid invocation, check your deployment packaging creat

如果jsp或servlet调用ejb时报下面的错误:
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、编辑%jboss%/server/default/conf/jboss-service.xml
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
<!-- The call by value mode. true if all lookups are unmarshalled using
the caller's TCL, false if in VM lookups return the value by reference.
-->
<attribute name="CallByValue">false</attribute>
...
</mbean>
将属性CallByValue的值改为true
2、编辑%jboss%/server/default/deploy/ear-deployer.xml
<mbean code="org.jboss.deployment.EARDeployer"
name="jboss.j2ee:service=EARDeployer">
<attribute name="Isolated">false</attribute>
<attribute name="CallByValue">false</attribute>
<attribute name="EnablelibDirectoryByDefault">true</attribute>
</mbean>
将属性Isolated和CallByValue的值改为true
3、编辑%jboss%/server/default/deploy/jboss-web.deployer/META-INF/jboss-service.x
ml
<attribute name="Java2ClassLoadingCompliance">false</attribute>
<attribute name="UseJBossWebLoader">false</attribute>
将属性Java2ClassLoadingCompliance和UseJBossWebLoader的值改为false,这里默认值一
般都是false
一般情况下,使用第二种方式就可以解决该问题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值