Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10674

NullPointerException when using ejb-local-ref does not have <local>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • TBD EAP 5
    • EAP_EWP 5.2.0
    • EJB
    • None
    • Hide

      See attached ejb-local-ref-ejb.jar

      Show
      See attached ejb-local-ref-ejb.jar
    • Hide

      Specify the <local>...</local> in the ejb-local-ref

      Show
      Specify the <local>...</local> in the ejb-local-ref
    • Not Required
    • NEW

      If ejb-jar.xml if using ejb-local-ref and <local> is not specified it will result in a null pointer exception.

      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
      version="3.0">

      <enterprise-beans>
      <session>
      <ejb-name>HelloBean</ejb-name>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      <ejb-local-ref>
      <ejb-ref-name>ejb/StatelessBeanRemote</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <!--
      <local>com.jboss.examples.ejb3.StatelessLocal</local>
      -->
      <ejb-link>StatelessBean</ejb-link>
      <injection-target>
      <injection-target-class>com.jboss.examples.ejb3.HelloBean</injection-target-class>
      <injection-target-name>friend</injection-target-name>
      </injection-target>
      </ejb-local-ref>
      </session>
      </enterprise-beans>
      </ejb-jar>

      16:09:22,815 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfszip:/home/bmaxwell/applications/servers/eap/jboss-eap-5.2.0/jboss-eap-5.2/jboss-as/server/default/deploy/ejb-local-ref-ejb.jar/ state=ClassLoader mode=Manual requiredState=PostClassLoader
      org.jboss.deployers.spi.DeploymentException: java.lang.NullPointerException
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:159)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentLast(DeployersImpl.java:1314)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1115)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:229)
      at org.jboss.Main$1.call(Main.java:561)
      at org.jboss.Main$1.call(Main.java:557)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveEjbLocalRefs(MappedReferenceMetaDataResolverDeployer.java:906)
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(MappedReferenceMetaDataResolverDeployer.java:743)
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(MappedReferenceMetaDataResolverDeployer.java:768)
      at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:155)
      ... 34 more

            jboss-set_jira JBoss SET
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: