6 Replies Latest reply on Dec 6, 2009 8:47 PM by Peter Johnson

    Destination COnfiguration issue with Jboss 5 and Messaging

    RAJENDRA KAVURI Newbie

      Hi

      I am recently upgrading to Jboss 5 and started evaluating Jboss Messaging. I have configured orcale as database. Server came up properly. Later on I have added new topic configuration in destination-service.xml

      <mbean code="org.jboss.jms.server.destination.TopicService"
       name="jboss.messaging.destination:service=Topic,name=serverPublishTopic"
       xmbean-dd="xmdesc/Topic-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="SecurityConfig">
       <security>
       <role name="guest" read="true" write="true"/>
       <role name="publisher" read="true" write="true" create="false"/>
       <role name="durpublisher" read="true" write="true" create="true"/>
       <role name="dursubscriber" read="true" write="true" create="true"/>
       </security>
       </attribute>
       </mbean>


      Once after adding the above destination I have restarted the server. It came up properly.

      Then I have logged into JMX_CONSOLE and find the my topic under destinations section. When I am trying to open my destination(serverPublishTopic) I am getting the following exception. I am also getting the same exception even I am trying to access any example topics.

      16:16:30,761 ERROR [ExceptionUtil] Topic[(destination.getName() == NULL)] listMessagesNonDu
      rableSub
      java.lang.NullPointerException
       at org.jboss.jms.server.destination.ManagedTopic.getMessageCounters(ManagedTopic.ja
      va:159)
       at org.jboss.jms.server.destination.TopicService.getMessageCounters(TopicService.ja
      va:559)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
      a:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.AttributeDispatcher.invoke(AttributeDispatcher.java:99)
      
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanAttributeInterceptor.invoke(ModelMBeanAttribu
      teInterceptor.java:197)
       at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.ja
      va:76)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
       at org.jboss.mx.server.AbstractMBeanInvoker.getAttribute(AbstractMBeanInvoker.java:
      362)
       at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:565)
       at org.jboss.jmx.adaptor.control.Server.getMBeanAttributeResultInfo(Server.java:144
      )
       at org.apache.jsp.inspectMBean_jsp._jspService(inspectMBean_jsp.java:283)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
      erChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
      java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
      :638)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
      her.java:444)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
      ava:382)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
      a:310)
       at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorServlet.ja
      va:227)
       at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.
      java:100)
       at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:81)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
      erChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
      java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9
      6)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
      erChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
      java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
      35)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
      91)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociatio
      nValve.java:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(Security
      ContextEstablishmentValve.java:126)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityC
      ontextEstablishmentValve.java:70)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
      lve.java:158)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
      )
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
      otocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      16:16:30,933 WARN [TopicService] Topic is stopped.
      16:16:30,933 WARN [TopicService] Topic is stopped.
      16:16:30,933 WARN [TopicService] Topic is stopped.
      16:16:30,933 WARN [TopicService] Topic is stopped.
      16:16:30,933 WARN [TopicService] Topic is stopped.
      16:16:30,933 WARN [TopicService] Topic is stopped.



      When I am trying to make a JMS Connection to this topic from a simple Java client I am getting following excpeiton

      Exception in thread "main" javax.naming.NameNotFoundException: ConnectionFactory 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
      a:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
       at sun.rmi.transport.Transport$1.run(Transport.java:153)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
       at java.lang.Thread.run(Thread.java:595)
       at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall
      java:247)
       at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
       at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at TestClientJBoss.main(TestClientJBoss.java:33)


      It seems I am missing something in configurations. Please advise.

      Thanks
      Raj

      Thanks
      Raj

        • 1. Re: Destination COnfiguration issue with Jboss 5 and Messagi
          Yong Hao Gao Master

          I just tried your config on my machine and i didn't get the problem.

          My version is 5.0.1.GA / JBM 1.4.1.GA

          • 2. Re: Destination COnfiguration issue with Jboss 5 and Messagi
            RAJENDRA KAVURI Newbie

            Hi Howard

            Thanks for the reply.

            I am still having the issue. I found a workaround for the same. I have configured the oracle as backend for JBoss by copying the oracle-ds.xml and oracle-persistance-service.xml files from examples folder to ${JbossRoot}/server/default/deploy and ${JbossRoot}/server/default/deploy/messaging folders respectively and modified the files to refer my local oracle db details.

            But I am getting the errors during startup the server related to JBM_POSTOFFICE table creation. Table is not created which in turn not associating the destinations to ConnectionFactory.

            here is the error -

            09:35:29,183 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete
            deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            
            DEPLOYMENTS MISSING DEPENDENCIES:
             Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is mi
            ssing the following dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is miss
            ing the following dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the f
            ollowing dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=A,service=Queue" is missing the following de
            pendencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=B,service=Queue" is missing the following de
            pendencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=C,service=Queue" is missing the following de
            pendencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=D,service=Queue" is missing the following de
            pendencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following
            dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the fo
            llowing dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=ex,service=Queue" is missing the following d
            ependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=securedTopic,service=Topic" is missing the f
            ollowing dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=serverPublishTopic,service=Topic" is missing
             the following dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=testDurableTopic,service=Topic" is missing t
            he following dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=testQueue,service=Queue" is missing the foll
            owing dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging.destination:name=testTopic,service=Topic" is missing the foll
            owing dependencies:
             Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is ac
            tually in state "Configured")
             Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
             Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is
            actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **")
            
            DEPLOYMENTS IN ERROR:
             Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason
            (s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **


            If I commented the following line in ${JBossRoot}/server/default/deploy/messaging/oracle-persistance-service.xml, server is coming up properly -

            <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>


            Also, I have deleted the following confg file from deploy folder. This is also generating some deployment errors while starting up the server -

            ${JBossRoot}/server/default/deploy/ejb2-timer-service.xml


            Please advise.

            Thanks
            Raj

            • 3. Re: Destination COnfiguration issue with Jboss 5 and Messagi
              yashendra chandrakar Newbie

              Hi Raj,

              Any luck finding the solution for this problem.

              I am also facing exactly same problem only difference is that I am trying to use MySql ds and persistance files from example folder.

              Please post your solution if you found any.

              Thank You
              Yashendra

              • 4. Re: Destination COnfiguration issue with Jboss 5 and Messagi
                Peter Johnson Master

                Yashendra, it would help if you told us exactly what you did.

                Also, see if this helps: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224936#4224936

                The instructions that abdujaparov and I posted are for switching DefaultDS to use a MySQL database, but setting up JMS is a subset of that. The only additional step you need to take, if you are not replacing DefaultDS, is to change all references to DefaultDS in the mysql-persistence-service.xml file to the JNDI name you used in mysql-ds.xml.

                • 5. Re: Destination COnfiguration issue with Jboss 5 and Messagi
                  amira manai Newbie

                   

                  "PeterJ" wrote:
                  Yashendra, it would help if you told us exactly what you did.

                  Also, see if this helps: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224936#4224936

                  The instructions that abdujaparov and I posted are for switching DefaultDS to use a MySQL database, but setting up JMS is a subset of that. The only additional step you need to take, if you are not replacing DefaultDS, is to change all references to DefaultDS in the mysql-persistence-service.xml file to the JNDI name you used in mysql-ds.xml.

                  Hi Mr Peter,
                  i'm developping an ejb3 application and i was having errors in the starting of the project but i fortunly fix it :
                  But when i run the client class i get this errors:


                  08:08:44,525 DEBUG TimedSocketFactory:87 - createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
                  javax.naming.NameNotFoundException: HotelTestBean 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:396)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
                   at sun.rmi.transport.Transport$1.run(Unknown Source)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at sun.rmi.transport.Transport.serviceCall(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                   at java.lang.Thread.run(Unknown Source)
                   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
                   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
                   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
                   at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
                   at javax.naming.InitialContext.lookup(Unknown Source)
                   at de.laliluna.library.ClientA.main(ClientA.java:32)
                  Exception in thread "main" java.lang.RuntimeException: javax.naming.NameNotFoundException: HotelTestBean not bound
                   at de.laliluna.library.ClientA.main(ClientA.java:38)
                  Caused by: javax.naming.NameNotFoundException: HotelTestBean 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:396)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
                   at sun.rmi.transport.Transport$1.run(Unknown Source)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at sun.rmi.transport.Transport.serviceCall(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
                   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                   at java.lang.Thread.run(Unknown Source)
                   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
                   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
                   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
                   at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
                   at javax.naming.InitialContext.lookup(Unknown Source)
                   at de.laliluna.library.ClientA.main(ClientA.java:32)
                  

                  I don't know the cause i put all my classes in this forum link:

                  http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269135#4269135
                  Thank you for help!!! it's very urgent i have to complete for this Monday
                  Regards


                  • 6. Re: Destination COnfiguration issue with Jboss 5 and Messagi
                    Peter Johnson Master

                    You can use the JNDIView to see what names are in the JNDI tree. Most likely you are simply using the wrong name. See this:
                    http://www.jboss.org/community/click.jspa?searchID=426554&objectType=102&objectID=9584