7 Replies Latest reply on Oct 1, 2008 1:26 PM by peterj

    Trailblazer fails to start

      Hi,

      I followed the TrailBlazer tutorial (http://trailblazer.demo.jboss.com/EJB3Trail/). Since I am new to both JBoss and EJBs I started a scratch EJB project (in Eclipse) and added the code provided in the tutorial. The Project deploys fine on JBoss but the Message beans fails to connect to their corresponding queues. It seems to be a security issue but I can't figure out the problem - and I spent the entire day trying :( Below is an excerpt of the error log. Could anyone give my a clue?

      19:30:57,476 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@aaee6d(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@fe437f destination=queue/mdb isTopic=false 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)
      19:30:57,514 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@aaee6d(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@fe437f destination=queue/mdb isTopic=false 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.jms.JMSSecurityException: Connection not authorized to subscribe to destination: mdb
      at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:156)
      at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:643)
      at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:177)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:188)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
      at java.lang.Thread.run(Thread.java:619)

        • 1. Re: Trailblazer fails to start
          peterj

          What version of JBossAS are you using? I just now tried it with 4.2.3 and it worked fine. If you are using 4.0.x, I suggest you move up to 4.2.3.

          • 2. Re: Trailblazer fails to start

            I use version 4.2.x so unfortunately it isn't that easy. Do I need to specify any specifics regarding security to allow the beans to access the queues? I might have missed something when grabbing the files from the demo..

            /Magnus

            • 3. Re: Trailblazer fails to start
              peterj

              4.2.x? Please be specific (4.2.x includes 4.2.3)

              The default security should grant you access. The only reasons I can think of that could cause this problem are:

              1) Another MDB is using the same queue name, in which case perhaps only that MDB has read access to the queue.

              2) A *-service.xml configuration file has that queue name declared, in which case the security settings in configuration file are being applied.

              • 4. Re: Trailblazer fails to start

                Ok I am using jboss 4.2.2.GA deployed on Ubuntu 8.04.1 (Linux version 2.6.24-19-generic).

                1) Another MDB is using the same queue name, in which case perhaps only that MDB has read access to the queue.

                I don't think it could be this problem. The beans in the TrailBlazer demo tries to connect to many different queues - all have the same problem.

                2) A *-service.xml configuration file has that queue name declared, in which case the security settings in configuration file are being applied.

                Same as above, there are many queue and the beans can not connect.

                I will download 4.2.3 and reinstall and do it all over again to see if the problem persists or it was just a fluke. Meanwhile, If you get other ideas on what the problem could be please don't hesitate to post.

                • 5. Re: Trailblazer fails to start

                  I also tried to deploy the provided EJB3Trail.ear (that is without creating my own project and so on..). The same result. The queues that are problematic are: mdb, mdpojo, injection. The first error I get in the logs is the following (with some ok messages before that).

                  18:42:03,897 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/injection
                  18:42:03,898 WARN [MessagingContainer] destination not found: queue/injection reason: javax.naming.NameNotFoundException: queue/injection
                  18:42:03,898 WARN [MessagingContainer] creating a new temporary destination: queue/injection
                  18:42:03,907 INFO [injection] Bound to JNDI name: queue/injection
                  18:42:03,929 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
                  18:42:03,929 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=EJB3Trail.ear,jar=beans.jar,name=TransCalculator,service=EJB3 with dependencies:
                  18:42:03,929 INFO [JmxKernelAbstraction] persistence.units:ear=EJB3Trail.ear,jar=beans.jar,unitName=ejb3trail
                  18:42:03,943 INFO [EJBContainer] STARTED EJB: trail.transaction.TransCalculator ejbName: TransCalculator
                  18:42:03,950 INFO [EJB3Deployer] Deployed: file:/home/magnus/jboss-4.2.2.GA/server/default/tmp/deploy/tmp23368EJB3Trail.ear-contents/beans.jar
                  18:42:03,980 INFO [TomcatDeployer] deploy, ctxPath=/EJB3Trail, warUrl=.../tmp/deploy/tmp23368EJB3Trail.ear-contents/web-exp.war/
                  18:42:04,010 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@78b973(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@d4c5a0 destination=queue/mdpojo isTopic=false 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.jms.JMSSecurityException: Connection not authorized to subscribe to destination: mdpojo
                  at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:156)
                  at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:643)
                  at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:177)
                  at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:188)
                  at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
                  at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
                  at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
                  at java.lang.Thread.run(Thread.java:619)

                  • 6. Re: Trailblazer fails to start

                    I just downloaded JBossAS 4.2.3 and deployed EJB3Trail.ear. I did just as I did before and guess what - this time it worked?! hm, total confusion..

                    Now I just need to see if it works when I deploy my project from within Eclipse as well.

                    • 7. Re: Trailblazer fails to start
                      peterj

                      Looks like something was fixed in 4.2.3. Reviewing the release notes might give a clue as to what it was.