6 Replies Latest reply on Jul 7, 2006 5:51 AM by chief39

    JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)

    chief39


      I've got a problem during migration to v4.0.4
      (There were a lot of problems, but i solved most. But this trouble....)

      I built project and deployed it.
      Immediately, i got the folowing stacktrace:

      18:49:58,232 WARN [JMSContainerInvoker] JMS provider failure detected for SchedulerListenerBean
      org.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (javax.jms.InvalidDestinationException: Pr
      evious topic does not exist: TOPIC.com/mysystem/mq/JobInvocationTopic)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:720)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:839)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


      File topic-config-service.xml contains the following:
      <mbean code="org.jboss.mq.server.jmx.Topic"
       name="jboss.mq.destination:service=Topic,name=job-invocation-topic">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
       <attribute name="JNDIName">topic/com/mysystem/mq/JobInvocationTopic</attribute>
       </mbean>
      


      ejb-jar contains:
      <message-driven>
       <ejb-name>SchedulerListenerBean</ejb-name>
       <resource-adapter-name>jms-ra.rar</resource-adapter-name>
       <configuration-name>Standard Message Driven Bean</configuration-name>
       <destination-jndi-name>topic/com/mysystem/mq/JobInvocationTopic</destination-jndi-name>
       <mdb-subscription-id>SchedulerListenerBeanSubscribtion</mdb-subscription-id>
       <mdb-client-id>SchedulerListenerBean</mdb-client-id>
       </message-driven>


      For lookup() we use constant "topic/com/mysystem/mq/JobInvocationTopic"

      But... There are several topics and all of them are unavailable by JNDI in this way.

      topic-config are the same in 4.0.2 and 4.0.4


      Somebody told me, that it could be new version of JMS provider, but can somebody tell me what's exactly with topic names and how i can solve it... ?

      Thanks in advance


        • 1. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
          jaikiran

           

          topic does not exist: TOPIC.com/mysystem/mq/JobInvocationTopic


          I am not sure why the server is looking up the topic at TOPIC.com/mysystem/mq/JobInvocationTopic instead of TOPIC.topic/com/mysystem/mq/JobInvocationTopic

          Try out the following:

          Change your topic-config-service.xml (only this file) to:


          <mbean code="org.jboss.mq.server.jmx.Topic"
           name="jboss.mq.destination:service=Topic,name=job-invocation-topic">
           <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
           <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
           <attribute name="JNDIName">com/mysystem/mq/JobInvocationTopic</attribute>
           </mbean>
          


          Notice that i have removed the 'topic/' from the JNDIName. See if this works.


          • 2. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
            jaikiran

            The other thing that you can do is, use the jmx-console to see to which jndiname the topic is bound. Here's how you can do it:

            - Access http://localhost:8080/jmx-console
            - Here you will find a list of services that have been deployed in jboss.
            - On this page, under the section jboss.mq.destination, you will find the name of your topic (i.e. job-invocation-topic). Click on it and the page that comes up, will show you all the details of your topic, including the jndi-name to which it is bound.

            • 3. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
              chief39

              I've do it.
              So, that's what i got^
              [CODE]
              16:38:12,445 WARN [JMSContainerInvoker] Could not find the topic destination-jndi-name=topic/com/mysystem/mq/JobInvocationTopic
              javax.naming.NameNotFoundException: com not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
              ................
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              16:38:12,460 WARN [JMSContainerInvoker] destination not found: topic/com/mysystem/mq/JobInvocationTopic reason: javax.naming.NameNotFo
              undException: com not bound
              16:38:12,460 WARN [JMSContainerInvoker] creating a new temporary destination: topic/com/mysystem/mq/JobInvocationTopic
              16:38:12,460 INFO [com/mysystem/mq/JobInvocationTopic] Bound to JNDI name: topic/com/mysystem/mq/JobInvocationTopic

              [/CODE]

              :(

              Earlier, i was trying to change all to "com/mysystem/mq/JobInvocationTopic"
              (in conf, ejb-jar, etc.)
              No results....

              • 4. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
                chief39

                It's not a mistake during deploy...

                I think it's differences in JMS providers...
                But how can i solve it?
                JBoss documentation is silent about it. Or, maybe, i watch it not so closely...

                • 5. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
                  chief39

                  I replaced "jms" folder in 4.0.4 by analog from 4.0.2
                  And got the same.

                  Downloading of Jboss-messaging-1.0.1.CR2 have been finished.
                  Tomorrow will try to solve my trouble using it...

                  Is here nobody, who was confronted with these difficulties?

                  • 6. Re: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
                    chief39

                    One more feature:

                    When deploying project without topic's configs in JBoss - JBoss tells me, that it can't find topic "topic/com/mysy....."
                    But, if configs with "topic/com/mysy....." are in JBoss "deploy" folder - on deploying i get a message mentioned in the first post. About "TOPIC.com/mysyst..."

                    And... What does it mean: "previous topic"? I can't find understandable docs about it :(