Thanks for your tips, I finally get it work by removing the mappedName
parameter from the @EJB annotation. It's strange. Let me make it clearer:
1, deploy a ear package contain a session bean(deployed JNDI name
"CounterBeanRemote") implement a remote interface.
The EJB:
@Stateless
public clas
y-ear
>>> >> myear
>>> >> 1.0
>>> >> MpeMessageDispatcher
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> EJBinterface:
>>> >> @Remote
>>> >&g
Shawn Jiang wrote:
> I encounter the same problem. Here is my case.
> 1, deploy a ear package contain a session bean(deployed JNDI name
> "CounterBeanRemote") implement a remote interface.
>
> 2, deploy a war package that contains a servlet using
> @EJB(mappedName="CounterBeanRemote") to in
MessageDispatcherInterface {
>> >>
>> >> EJB:
>> >> @Stateless(name="MpeMessageDispatcher")
>> >> public class MpeMessageDispatcher implements
>> >> MpeMessageDispatcherInterface {
>> >>
>> >> javax.xml.ws.WebServiceException: Servi
tcher implements
> >> MpeMessageDispatcherInterface {
> >>
> >> javax.xml.ws.WebServiceException: Service resource injection failed
> >>
> >> Caused by: java.lang.InstantiationException: Some objects to be
> >> injected
> >> were not found in jnd
ere not found in jndi: [javax.naming.NameNotFoundException: Name
>> "java:openejb/Deployment/myear/MpeMessageDispatcher/
>> myear.mpe.MpeMessageDispatcherInterface"
>> not found.]
>> at
>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:
rg
.apache
.geronimo
.jaxws
.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
at
org.apache.geronimo.cxf.pojo.POJOEndpoint.(POJOEndpoint.java:76)
... 65 more
inject
thx
--
View this message in context:
http://www.nabble.com/inject-EJB-in-Webapplication-tp21590354s134p21590354.html
ce(Holder.java:171)
at
org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
at
org.apache.geronimo.cxf.pojo.POJOEndpoint.(POJOEndpoint.java:76)
... 65 more
inject
thx
--
View this message in context:
http://www.nabble.com/inject-EJB-in-Webapplication-tp21590354s134p21590354.html
Sent fr