5 Replies Latest reply on Mar 14, 2011 3:15 PM by julianovidal

    HornetQException [errorCode=105 ...]

    julianovidal

      Hi,

       

      I've just migrated from JBoss AS 5.1.0 to AS 6.0.0.

      Everything seems fine with one exception. All Queues now are by default HornetQs what's not a problem.

      The problem is that I'm getting the following exception in my output console.

      10:43:14,447 INFO  [EJBContainer] STARTED EJB: com.jvidal.model.message.xyzMDB ejbName: xyzMDB

      10:43:14,479 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

      10:43:14,956 WARN  [HornetQActivation] Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@4362f2fe destination=queue/xyzMDB destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): HornetQException[errorCode=105 message=Unable to validate user: null for check type CONSUME for address jms.queue.xyzMDB]

                at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:287) [:6.0.0.Final]

                at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateConsumer(ClientSessionImpl.java:1556) [:6.0.0.Final]

                at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:447) [:6.0.0.Final]

                at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:392) [:6.0.0.Final]

                at org.hornetq.core.client.impl.DelegatingSession.createConsumer(DelegatingSession.java:201) [:6.0.0.Final]

                at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:165) [:6.0.0.Final]

                at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:291) [:6.0.0.Final]

                at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:573) [:6.0.0.Final]

                at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172) [:6.0.0.Final]

                at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [:2.0.0.CR7]

                at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801) [:2.0.0.CR7]

                at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [:2.0.0.CR7]

                at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821) [:2.0.0.CR7]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122) [:2.0.0.CR7]

       

      I have the MDB declared into a filename : my-hornetq-jms.xml

       

      <configuration xmlns="urn:hornetq"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">

       

       

        <queue name="xyzMDB">

          <entry name="/queue/xyzMDB"/>

        </queue>

       

      </configuration>

       

       

      And my MDB is:

       

      @MessageDriven(name = "xyzMDB", activationConfig = {

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

                          @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/xyzMDB") })

      @ResourceAdapter("jms-ra.rar")

      public class xyzMDB implements MessageListener

      {

                private static Logger logger = Logger.getLogger(xyzMDB.class);

       

        public void onMessage(Message message)

                {

          ObjectMessage objMessage = (ObjectMessage) message;

       

          try {

            XYZMessage msg = (XYZMessage) objMessage.getObject();

       

          } catch (JMSException e) {

            logger.error(e.getMessage(), e);

          } catch (MyException e)  {

            logger.error("Something happend: " + e.getMessage(), e);

          }

        }

      }

       

       

      Any ideas why I'm getting the exception?

       

      Thanks!

        • 1. HornetQException [errorCode=105 ...]
          jaikiran
          • 2. HornetQException [errorCode=105 ...]
            julianovidal

            I'm not sure about this dependency. This exception is being thrown in the server startup and all my MDBs (about 15 of them) are throwing that same exception.

             

            Also, most of my posting messaging is done using a single class that receives the queue name as a parameter.

            • 3. HornetQException [errorCode=105 ...]
              jaikiran

              Juliano Vidal wrote:

               

              I'm not sure about this dependency. This exception is being thrown in the server startup and all my MDBs (about 15 of them) are throwing that same exception.

               

               

              Yep, looks like a dependency issue. Have you tried adding the explicit dependencies? Or you could even try first deploying your *-hornetq-jms.xml and once that's completely deployed then deploying your application (.war, .jar or .ear whatever it is). That will confirm if this is a dependency issue.

              • 4. HornetQException [errorCode=105 ...]
                julianovidal

                Ok. No exceptions this time . Seems that you are correct.

                 

                What I'm not fowllowing now is, where do I have to add the Depency annotation.

                Does it go in all my MDBs? Because I did it and I'm still getting the errors

                 

                @Depends("org.hornetq:module=JMS,name=\"xyzMDB\",type=Queue")

                @MessageDriven(name = "xyzMDB", activationConfig = {

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

                                    @ActivationConfigProperty(propertyName = "destination", propertyValue ="queue/xyzMDB") })

                @ResourceAdapter("jms-ra.rar")

                public class xyzMDB implements MessageListener

                {

                          private static Logger logger = Logger.getLogger(xyzMDB.class);

                 

                  public void onMessage(Message message)

                          {

                    ObjectMessage objMessage = (ObjectMessage) message;

                 

                    try {

                      XYZMessage msg = (XYZMessage) objMessage.getObject();

                 

                    } catch (JMSException e) {

                      logger.error(e.getMessage(), e);

                    } catch (MyException e)  {

                      logger.error("Something happend: " + e.getMessage(), e);

                    }

                  }

                }

                 

                 

                 

                Thanks in advance!

                • 5. HornetQException [errorCode=105 ...]
                  julianovidal

                  Jaikiran,

                   

                  I'm still with the same problem.

                  I see what you mean, but as I said, most of the MDBs are not injected as a Resource in some SessionBean. So there is no way to add the dependency for them and I keep receiving the exceptions.

                   

                  Any ideas?

                   

                  Thanks again.