Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1499

Issue with legacy <ejb-local-ref> lookup from a WAR

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.1.Final
    • 7.0.0.Final
    • EJB
    • None
    • Hide

      Would need to create a EJB 3.0 jar module with a SLSB. The EJB jar module is deployed inside an EAR with a WAR. The WAR would have a resource such as a Servlet that would do the JNDI lookup from the web.xml <ejb-local-ref> tag.

      Show
      Would need to create a EJB 3.0 jar module with a SLSB. The EJB jar module is deployed inside an EAR with a WAR. The WAR would have a resource such as a Servlet that would do the JNDI lookup from the web.xml <ejb-local-ref> tag.

    Description

      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

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            rjbaty_jira Robert Baty (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: