1 Reply Latest reply on Feb 24, 2010 12:12 PM by peterj

    Queue not bind

    dimitarn

      I have this exception and i don't know why it is thrown, because the queue is working, is there chache to try to bound twice?

       

      [CODE]

      18:02:56,734 WARN  [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1ccbb8ee(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@19878659 destination=queue/MyDurableQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      javax.naming.NameNotFoundException: MyDurableQueue not bound
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
          at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.jboss.util.naming.Util.lookup(Util.java:222)
          at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:464)
          at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)
          at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
          at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
          at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)

      [/CODE]

       

      Here is how i defined it

      [CODE]

      <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=MyDurableQueue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
              <attribute name="JNDIName">queue/MyDurableQueue
              </attribute>
              <depends optional-attribute-name="ServerPeer">
                  jboss.messaging:service=ServerPeer</depends>
              <depends>jboss.messaging:service=PostOffice
              </depends>
              <attribute name="Clustered">true</attribute>
          </mbean>

      [/CODE]

       

      [CODE]

          qFactory = (QueueConnectionFactory) getCtx().lookup("ConnectionFactory");
              queueConnection = qFactory.createQueueConnection();
              // TODO: user
              // username/password
              queueSession = queueConnection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
              queue = queueSession.createQueue("MyDurableQueue");
              sender = queueSession.createSender(queue);

      [/CODE]

        • 1. Re: Queue not bind
          peterj
          I am confused. If you have a *-service.xml file that declares the queue, why is your code trying to create it?  Shouldn't you just look up the queue name in JNDI?