Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7225

NullPointerException on 5.1.0 when using ejb-local-ref

XMLWordPrintable

      A NullPointerException is being thrown when a ejb-local-ref is specified on web.xml and only "description", "ejb-ref-name" and "ejb-link" are filled for the reference.

      ------------------------------------------------------------------------------------------------------------------------------------------------------------
      web.xml fragment
      ------------------------------------------------------------------------------------------------------------------------------------------------------------

      <ejb-local-ref>
      <description>ejb/AbrtBean/local</description>
      <ejb-ref-name>ejb/AbrtBean/local</ejb-ref-name>
      <ejb-link>AbrtBean</ejb-link>
      </ejb-local-ref>

      ------------------------------------------------------------------------------------------------------------------------------------------------------------
      SessionBean fragment
      ------------------------------------------------------------------------------------------------------------------------------------------------------------

      @Stateless(name="AbrtBean")
      @Name("abrtBean")
      public class AbrtBean implements AbrtLocal, AbrtRemote {

      ------------------------------------------------------------------------------------------------------------------------------------------------------------
      Stacktrace for the issue:
      ------------------------------------------------------------------------------------------------------------------------------------------------------------

      15:26:20,483 ERROR [AbstractKernelController] Error installing to PostClassLoade
      r: name=vfszip:/C:/workspaces/drools/project/ear/target/ear-1.0.ear/ state=Class
      Loader mode=Manual requiredState=PostClassLoader
      org.jboss.deployers.spi.DeploymentException: java.lang.NullPointerException
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internal
      Deploy(MappedReferenceMetaDataResolverDeployer.java:174)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(
      AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deployer
      Wrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deployer
      sImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentLa
      st(DeployersImpl.java:1299)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentLa
      st(DeployersImpl.java:1248)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployers
      Impl.java:1100)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstra
      ctControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractContr
      oller.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(Abstra
      ctController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
      actController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abstr
      actController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
      ller.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractContro
      ller.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployers
      Impl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploye
      rImpl.java:702)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:830)
      at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:604)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      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:668)
      at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$4.run(HtmlAdaptorServle
      t.java:391)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$4.run(HtmlAdaptorServle
      t.java:388)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdap
      torServlet.java:387)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdap
      torServlet.java:312)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdap
      torServlet.java:106)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServle
      t.java:81)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
      ss(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
      e(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      onnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      7)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveE
      jbLocalRefs(MappedReferenceMetaDataResolverDeployer.java:906)
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(
      MappedReferenceMetaDataResolverDeployer.java:743)
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internal
      Deploy(MappedReferenceMetaDataResolverDeployer.java:170)
      ... 56 more
      15:26:21,483 WARN [MainDeployer] Failed to deploy: file:/C:/workspaces/drools/p
      roject/ear/target/ear-1.0.ear

      ------------------------------------------------------------------------------------------------------------------------------------------------------------
      Seam JNDI pattern (not so relevant for the bug report)
      ------------------------------------------------------------------------------------------------------------------------------------------------------------

      jndi-pattern="java:comp/env/ejb/#

      {ejbName}

      /local"

            jaikiran Jaikiran Pai (Inactive)
            rafaelri_jira Rafael Ribeiro (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: