12 Replies Latest reply on Aug 4, 2011 12:10 AM by jaikiran

    NameNotFoundException in MDB

    simas_ch

      I use jboss-as-7.1.0.Alpha1-SNAPSHOT and have a problem with an MDB.

       

      I created a queue that seams to be binded to java:jboss/jms/queue/bestellqueue

       

      09:29:18,199 INFO  [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-5) Bound messaging object to jndi name java:jboss/jms/queue/bestellqueue

       

      But when I try to use it in an MDB

       

       

      @MessageDriven(activationConfig = {

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

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/jms/queue/bestellqueue") })

       

      I get an exception:

       

      09:29:21,432 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@7db224 destination=java:jboss/jms/queue/bestellqueue destinationType=null ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): javax.naming.NameNotFoundException: Name 'jms' not found in context ''

       

      What's wrong? In JBoss 7.0.0 Final it seams to work.

       

      Thanks for your help.

        • 1. Re: NameNotFoundException in MDB
          jaikiran

          That should have worked. Can you please attach the server.log? Also, what does the standalone.xml look like for the queue configurations.

           

           

          Simon Martinelli wrote:

           

          What's wrong? In JBoss 7.0.0 Final it seams to work.

           

           

          7.0.0.Final has no MDB support. So it just ignored the MDBs.

          • 2. Re: NameNotFoundException in MDB
            simas_ch

            Please find attached the server.log.

             

            The configuration looks like that:

             

            <jms-queue name="bestellqueue">

              <entry name="queue/bestellqueue"/>

            </jms-queue>

            • 3. Re: NameNotFoundException in MDB
              jaikiran

              Looks like a dependency issue. I'll take a look. In the meantime as a workaround can you try first starting the server (with the queue configured) and once it is started, can you deploy the .ear?

              • 4. Re: NameNotFoundException in MDB
                simas_ch

                I tried to do that. But i get the same result.

                • 5. Re: NameNotFoundException in MDB
                  jaikiran

                  We have a testcase in AS7 code and I'm not able to reproduce this issue. Can you attach your application which shows this issue?

                  • 6. Re: NameNotFoundException in MDB
                    simas_ch

                    Please find attached the demo application and my standalone.xml

                    • 7. Re: NameNotFoundException in MDB
                      prasad.deshpande

                      try with your queue definition as :

                       

                      <jms-queue name="bestellqueue">

                        <entry name="java:jboss/jms/queue/bestellqueue"/>

                      </jms-queue>

                      • 8. Re: NameNotFoundException in MDB
                        simas_ch

                        Now there is no more problem with the queue but another issue.

                         

                        17:14:05,987 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"shop-ear-0.0.4-SNAPSHOT.ear\".\"shop-ejb-0.0.4-SNAPSHOT.jar\".component.DossierDAO.START missing [ jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".DossierDAO.\"env/ch.bls.shop.dataaccess.AbstractBaseDAO/em\" ]","jboss.deployment.subunit.\"shop-ear-0.0.4-SNAPSHOT.ear\".\"shop-ejb-0.0.4-SNAPSHOT.jar\".component.ArtikelDAO.START missing [ jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".ArtikelDAO.\"env/ch.bls.shop.dataaccess.AbstractBaseDAO/em\" ]","jboss.deployment.subunit.\"shop-ear-0.0.4-SNAPSHOT.ear\".\"shop-ejb-0.0.4-SNAPSHOT.jar\".jndiDependencyService missing [ jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".CheckService.\"env/ch.bls.shop.business.CheckService/em\", jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".DossierDAO.\"env/ch.bls.shop.dataaccess.AbstractBaseDAO/em\", jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".ArtikelDAO.\"env/ch.bls.shop.dataaccess.AbstractBaseDAO/em\" ]","jboss.deployment.subunit.\"shop-ear-0.0.4-SNAPSHOT.ear\".\"shop-ejb-0.0.4-SNAPSHOT.jar\".component.CheckService.START missing [ jboss.naming.context.java.comp.\"shop-ear-0.0.4-SNAPSHOT\".\"shop-ejb-0.0.4-SNAPSHOT\".CheckService.\"env/ch.bls.shop.business.CheckService/em\" ]"]}}}

                         

                        See attached logfile.

                        • 9. Re: NameNotFoundException in MDB
                          jaikiran

                          This actually turned out to be a bug (in handling some specific JNDI names). I've fixed it now and sent a pull request https://github.com/jbossas/jboss-as/pull/119. Thanks for reporting this.

                           

                          P.S: Prasad, this fix might also solve the issue that you had mentioned about the JNDI tree not showing the correct jndi names http://community.jboss.org/message/618083#618083

                          • 10. Re: NameNotFoundException in MDB
                            simas_ch

                            Thanks a lot.

                            I will wait for the next build.

                            • 11. Re: NameNotFoundException in MDB
                              prasad.deshpande

                              Yes Jaikiran, I exactly thought same when I saw this post. Thanks for you help!

                              • 12. Re: NameNotFoundException in MDB
                                jaikiran

                                This is now available in the nightly build.