Issue with legacy <ejb-local-ref> lookup from a WAR
---------------------------------------------------
Key: AS7-1499
URL:
https://issues.jboss.org/browse/AS7-1499
Project: Application Server 7
Issue Type: Bug
Components: EJB
Affects Versions: 7.0.0.Final
Environment: JBossAS 7.0.0.Final on a Windows developer desktop.
Reporter: Robert Baty
Assignee: Carlo de Wolf
Trying to deploy an application that consists of a EAR/WAR/EJB module all separate. In
the WAR a reference to the EJB3 SLSB is done like this:
<ejb-local-ref>
<ejb-ref-name>ejb/OrderResource</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>rjb.rest.restfully.services.ejb.basic.OrderResource</local>
<ejb-link>OrderResourceBean</ejb-link>
</ejb-local-ref>
And then in a WAR Listener class a lookup is done on an InitialContext like this:
InitialContext ic = new InitialContext();
Object orderResourceLocalProxy =
context.lookup("java:comp/env/ejb/OrderResource");
Seems to cause an exception so the application does not deploy. The stack trace is
below:
15:58:51,638 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed
to start service
jboss.deployment.subunit."RJBatyRESTEAR-1.2.ear"."RJBatyREST-1.2.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."RJBatyRESTEAR-1.2.ear"."RJBatyREST-1.2.war".POST_MODULE:
Failed to process phase POST_MODULE of subdeployment "RJBatyREST-1.2.war" of
deployment "RJBatyRESTEAR-1.2.ear"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at
org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_21]
at java.lang.Thread.run(Unknown Source) [:1.6.0_21]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Could not
determine type of ejb-local-ref java:module/env/ejb/OrderResource for component null
at
org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:93)
at
org.jboss.as.ee.component.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:60)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira