4 Replies Latest reply on Oct 3, 2011 9:39 AM by Naresh Bhatia

    NullPointerException from MDB

    Naresh Bhatia Novice

      I am getting the following NullPointerException when deploying a war file containing an MDB:

       

      ERROR [org.hornetq.ra.inflow.HornetQActivation] (jca-short-running-threads-threads - 1) Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@20e2e869 destination=null destinationType=null ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.NullPointerException

              at javax.naming.NameImpl.<init>(NameImpl.java:264) [:1.6.0_14]

              at javax.naming.CompositeName.<init>(CompositeName.java:214) [:1.6.0_14]

              at org.jboss.as.naming.util.NameParser.parse(NameParser.java:49)

              at org.jboss.as.naming.NamingContext.parseName(NamingContext.java:409)

              at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:209)

              at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_14]

              at org.hornetq.ra.Util.lookup(Util.java:174) [hornetq-ra-2.2.7.Final.jar:]

              at org.hornetq.ra.inflow.HornetQActivation.setupDestination(HornetQActivation.java:462) [hornetq-ra-2.2.7.Final.jar:]

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

              at org.hornetq.ra.inflow.HornetQActivation.handleFailure(HornetQActivation.java:548) [hornetq-ra-2.2.7.Final.jar:]

              at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:591) [hornetq-ra-2.2.7.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:619) [:1.6.0_14]

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

       

      The MDB has been declared as follows (mapped to jms/PerfQueue):

       

      @MessageDriven(mappedName="jms/PerfQueue")

      public class TextMessageListener implements MessageListener {

          ...

      }

       

      The queue has been declared as follows in standalone.xml:

       

      <jms-queue name="PerfQueue">

          <entry name="jms/PerfQueue"/>

      </jms-queue>

       

      I can see in the console that the queue has been deployed correctly with the JNDI name of jms/PerfQueue. What am I missing? (I am using JBoss AS 7.0.2.)

       

      Thanks.

      Naresh