[
https://jira.jboss.org/browse/JBWS-3026?page=com.atlassian.jira.plugin.sy...
]
Jens Mander updated JBWS-3026:
------------------------------
Description:
Situation: two different projects (bean and webservice-project)
First projet (Bean)
@Stateless
@Remote(MyBeanRemote.class)
@Local(MyBeanLocal.class)
public class MyBean implements MyBeanRemote, MyBeanLocal {
@PersistenceContext
EntityManager em;
/**
* Default constructor.
*/
public MyBean() {
}
....
}
Second project (webservice)
@SOAPBinding(style = Style.RPC)
@WebService(serviceName = "MyService", portName = "MyServicePort",
wsdlLocation = "/WEB-INF/wsdl/MyService.wsdl")
public class MyServiceImpl implements MyService {
@EJB(mappedName="MyBean/remote")
MyBeanRemote bean;
...
}
Deploying causes no problems but injecting the beaninstance into the webservice while
instanciating the service fails with:
java.net.URISyntaxException: Illegal character in path at index 35:
file:/C:/Entwicklung/jboss-5.1.0.GA
Native/server/default/data/wsdl/MyService.war/MyService.wsdl
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at
org.jboss.ws.core.jaxws.handler.MessageContextJAXWS.setOperationMetaData(MessageContextJAXWS.java:142)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:179)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,328 ERROR [InjectionException] Cannot inject field annotated with @EJB
annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not resolve
reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName '',
mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,343 ERROR [InvocationHandlerJAXWS] Method invocation failed with exception:
Cannot create endpoint instance:
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
11:32:25,359 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
Looking up the bean via JNDI works perfectly with;
Context ctx = new InitialContext();
MyBeanRemote psr = (MyBeanRemote) ctx.lookup("MyBean/remote");
Deploying the projects bundelt in one ear-file works also.
The problem seems to occur only when deploying the projects separately.
was:
Situation: two different projects (bean and webservice-project)
First projet (Bean)
@Stateless
@Remote(MyBeanRemote.class)
@Local(MyBeanLocal.class)
public class MyBean implements MyBeanRemote, MyBeanLocal {
@PersistenceContext
EntityManager em;
/**
* Default constructor.
*/
public MyBean() {
}
....
}
Second project (webservice)
@SOAPBinding(style = Style.RPC)
@WebService(serviceName = "MyService", portName = "MyServicePort",
wsdlLocation = "/WEB-INF/wsdl/MyService.wsdl")
public class MyServiceImpl implements MyService {
@EJB(mappedName="MyBean/remote")
MyBean bean;
...
}
Deploying causes no problems but injecting the beaninstance into the webservice while
instanciating the service fails with:
java.net.URISyntaxException: Illegal character in path at index 35:
file:/C:/Entwicklung/jboss-5.1.0.GA
Native/server/default/data/wsdl/MyService.war/MyService.wsdl
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at
org.jboss.ws.core.jaxws.handler.MessageContextJAXWS.setOperationMetaData(MessageContextJAXWS.java:142)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:179)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,328 ERROR [InjectionException] Cannot inject field annotated with @EJB
annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not resolve
reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName '',
mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,343 ERROR [InvocationHandlerJAXWS] Method invocation failed with exception:
Cannot create endpoint instance:
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
11:32:25,359 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
Looking up the bean via JNDI works perfectly with;
Context ctx = new InitialContext();
MyBeanRemote psr = (MyBeanRemote) ctx.lookup("MyBean/remote");
Deploying the projects bundelt in one ear-file works also.
The problem seems to occur only when deploying the projects separately.
Injecting EJB into Webservice via
@EJB(mappedName="MyBean/remote")
------------------------------------------------------------------
Key: JBWS-3026
URL:
https://jira.jboss.org/browse/JBWS-3026
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-cxf, jbossws-native
Affects Versions: jbossws-cxf-3.2.2, jbossws-native-3.2.2
Environment: JBossAS 5.1
Reporter: Jens Mander
Situation: two different projects (bean and webservice-project)
First projet (Bean)
@Stateless
@Remote(MyBeanRemote.class)
@Local(MyBeanLocal.class)
public class MyBean implements MyBeanRemote, MyBeanLocal {
@PersistenceContext
EntityManager em;
/**
* Default constructor.
*/
public MyBean() {
}
....
}
Second project (webservice)
@SOAPBinding(style = Style.RPC)
@WebService(serviceName = "MyService", portName = "MyServicePort",
wsdlLocation = "/WEB-INF/wsdl/MyService.wsdl")
public class MyServiceImpl implements MyService {
@EJB(mappedName="MyBean/remote")
MyBeanRemote bean;
...
}
Deploying causes no problems but injecting the beaninstance into the webservice while
instanciating the service fails with:
java.net.URISyntaxException: Illegal character in path at index 35:
file:/C:/Entwicklung/jboss-5.1.0.GA
Native/server/default/data/wsdl/MyService.war/MyService.wsdl
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at
org.jboss.ws.core.jaxws.handler.MessageContextJAXWS.setOperationMetaData(MessageContextJAXWS.java:142)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:179)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,328 ERROR [InjectionException] Cannot inject field annotated with @EJB
annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not resolve
reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName '',
mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
11:32:25,343 ERROR [InvocationHandlerJAXWS] Method invocation failed with exception:
Cannot create endpoint instance:
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
11:32:25,359 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.IllegalStateException: Cannot create endpoint instance:
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:85)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:119)
at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:502)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:299)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:206)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.wsf.common.injection.InjectionException: Cannot inject field
annotated with @EJB annotation: de.hd.bean.MyBean de.hd.produktservice.MyServiceImpl.psr
at
org.jboss.wsf.common.injection.InjectionException.rethrow(InjectionException.java:106)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:367)
at
org.jboss.wsf.common.injection.InjectionHelper.injectResources(InjectionHelper.java:111)
at
org.jboss.wsf.common.invocation.InvocationHandlerJAXWS.onEndpointInstantiated(InvocationHandlerJAXWS.java:75)
at
org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE.getTargetBean(AbstractInvocationHandlerJSE.java:81)
... 28 more
Caused by: org.jboss.ejb3.common.resolvers.spi.UnresolvableReferenceException: Could not
resolve reference [EJB Reference: beanInterface 'de.hd.bean.MyBean', beanName
'', mappedName 'MyBean/remote'] for DeploymentUnit
AbstractVFSDeploymentContext@2840278{vfsfile:/C:/Entwicklung/jboss-5.1.0.GA%20Native/server/default/deploy/MyService.war/}
at
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver.resolveEjb(FirstMatchEjbReferenceResolver.java:73)
at
org.jboss.webservices.integration.injection.EJBBeanReferenceResolver.resolveField(EJBBeanReferenceResolver.java:88)
at
org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver.resolve(AbstractReferenceResolver.java:80)
at
org.jboss.wsf.common.injection.InjectionHelper.injectEJBAnnotatedAccessibleObjects(InjectionHelper.java:361)
... 31 more
Looking up the bean via JNDI works perfectly with;
Context ctx = new InitialContext();
MyBeanRemote psr = (MyBeanRemote) ctx.lookup("MyBean/remote");
Deploying the projects bundelt in one ear-file works also.
The problem seems to occur only when deploying the projects separately.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira