[
http://jira.jboss.com/jira/browse/JBWS-1822?page=comments#action_12394087 ]
Richard Opalka commented on JBWS-1822:
--------------------------------------
The problem is user defined EJB modules are loaded in wrong order.
When all user EJBs are in one archive there's no problem with EJB
injection, EJBs get started and registered correctly before jboss
webservices deployer hooks are called.
However when user split the EJBs to multiple modules he must know
exactly module dependencies, specify the modules in application.xml
in order he need to load and start them and the last step is
to provide jboss-app.xml with the following content:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss-app
PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
<jboss-app>
...
<module-order>strict</module-order>
...
</jboss-app>
to ensure EJB modules are loaded in the order specified in application.xml.
Above description is the solution of this problem.
In the case EJB modules are loaded in wrong order EJBs are not started
(thus not registered in the deployer because injection dependencies are not
satisfied yet). Then webservices deployer hooks fail for the
archive that has unsatisfied dependencies when it try
to find the EJBs (in our case EJB as WebService) in deployer.
Cannot find service endpoint target
-----------------------------------
Key: JBWS-1822
URL:
http://jira.jboss.com/jira/browse/JBWS-1822
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-jaxws
Affects Versions: jbossws-2.0.1
Environment: WindowsXP, JDK5U11, JBoss4.2.1
Reporter: Harro Harten
Assigned To: Richard Opalka
Fix For: jbossws-2.0.3
Attachments: Test_JBossws_201.rar
Hello,
I´ve taken the TestSample called 'webservice' of the JbossWS-native-2.0.1GA
package and modified it by adding a simple TestBean with the @EJB annotation inside of the
'EJB3Bean01.java'. This works very well, only if all classes are in the same
package,
if you move the TestBean in another package, the following Error occur:
ERROR [org.jboss.deployment.MainDeployer] Could not start deployment:
file:/C:/jboss_4.2.1_WS_2.0.1/server/default/tmp/deploy/tmp39184test.ear-contents/jaxws-samples-webservice01-ejb3.jar
javax.xml.ws.WebServiceException: Cannot find service endpoint target:
jboss.j2ee:name=EJB3Bean01,service=EJB3,jar=jaxws-samples-webservice01-ejb3.jar,ear=test.ear
at
org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.init(InvocationHandlerEJB3.java:83)
at
org.jboss.wsf.framework.deployment.DefaultLifecycleHandler.create(DefaultLifecycleHandler.java:51)
at
org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect.create(EndpointLifecycleDeploymentAspect.java:42)
at
org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
at
org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
at
org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
at
org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at
org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy32.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
I´ve added the whole eclipse project as an attachment.
Thanks,
Harry
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira