2 Replies Latest reply on Mar 5, 2012 6:33 AM by Till Essers

    NullPointerException from MDB in 7.1 Final, was working in cr1b

    Till Essers Newbie

      Hi there,

       

      I'm trying to deploy a WAR with a MDB in JBoss AS 7.1 Final and I'm getting the following error:

       

      11:26:47,951 WARN  [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 1) Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@18ef33e destination=OpenVpnMonitoringTopic destinationType=javax.jms.Topic ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.RuntimeException: java.lang.NullPointerException

                at org.jboss.as.ejb3.component.EJBComponent.createViewInstanceProxy(EJBComponent.java:161)

                at org.jboss.as.ejb3.component.EJBComponent.createViewInstanceProxy(EJBComponent.java:147)

                at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.access$000(MessageDrivenComponent.java:58)

                at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$2.obtain(MessageDrivenComponent.java:118)

                at org.jboss.as.ejb3.inflow.JBossMessageEndpointFactory.createEndpoint(JBossMessageEndpointFactory.java:54)

                at org.jboss.as.ejb3.inflow.JBossMessageEndpointFactory.createEndpoint(JBossMessageEndpointFactory.java:49)

                at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:185) [hornetq-ra-2.2.11.Final.jar:]

                at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:296) [hornetq-ra-2.2.11.Final.jar:]

                at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:605) [hornetq-ra-2.2.11.Final.jar:]

                at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212)

                at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

                at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

                at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

                at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

                at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.NullPointerException

                at org.jboss.as.ejb3.component.EJBComponent.createViewInstanceProxy(EJBComponent.java:158)

                ... 15 more

       

      The JMS destination in the config:

      <jms-topic name="OpenVpnMonitoringTopic">

          <entry name="OpenVpnMonitoringTopic"/>

      </jms-topic>

       

      And the annotations of the class itself:

      @MessageDriven(activationConfig = {

                          @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic") ,

                          @ActivationConfigProperty(propertyName="destination", propertyValue = "OpenVpnMonitoringTopic")})

      public class OpenVpnTopicListener implements MessageListener {

       

      As mentioned in the title, it was working in the cr1b release but isn't with 7.1 Final. What am I doing wrong here?

        • 2. Re: NullPointerException from MDB in 7.1 Final, was working in cr1b
          Till Essers Newbie

          I tried it with the latest nightly. The deployment still fails but I don't see the HornetQ warning anymore:

           

          2:52:01,686 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'OpenVpnTopicListener' with 'hornetq-ra' resource adapter

          12:52:02,028 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Context [/configwebapp] startup failed due to previous errors: java.lang.NullPointerException

                    at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:353) [jboss-as-web-7.1.1.Final-SNAPSHOT.jar:7.1.1.Final-SNAPSHOT]

                    at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169) [jboss-as-web-7.1.1.Final-SNAPSHOT.jar:7.1.1.Final-SNAPSHOT]

                    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417) [jbossweb-7.0.12.Final.jar:]

                    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [jbossweb-7.0.12.Final.jar:]

                    at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162) [jboss-as-web-7.1.1.Final-SNAPSHOT.jar:7.1.1.Final-SNAPSHOT]

                    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.12.Final.jar:]

                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3790) [jbossweb-7.0.12.Final.jar:]

                    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final-SNAPSHOT.jar:7.1.1.Final-SNAPSHOT]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0]

                    at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0]

           

          But it's the same error I get in 7.1 Final:

          13:01:18,104 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) JBAS014142: Started message driven bean 'OpenVpnTopicListener' with 'hornetq-ra' resource adapter

          13:01:18,211 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Context [/configwebapp] startup failed due to previous errors: java.lang.NullPointerException

                    at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:390) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                    at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417) [jbossweb-7.0.10.Final.jar:]

                    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [jbossweb-7.0.10.Final.jar:]

                    at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.10.Final.jar:]

                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3790) [jbossweb-7.0.10.Final.jar:]

                    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0]

                    at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0]