5 Replies Latest reply on Jul 7, 2014 7:21 AM by noboundaries

    JMS Queue in Jboss

    noboundaries Newbie

      Getting issues on JMS sample from  https://sites.google.com/a/thedevinfo.com/thedevinfo/Home/jboss/jboss-application-server/jboss-and-jms-java-message-service-tutorial

       

      Starting JMS Example Listener

      Program will be active for 1 minute.

      performing lookup...

      Error creating listener: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]

      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:786)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)

          at javax.naming.InitialContext.lookup(InitialContext.java:351)

          at Listener.initializeListener(Listener.java:79)

          at Listener.<init>(Listener.java:37)

          at Listener.main(Listener.java:114)

      Caused by: java.lang.ClassNotFoundException: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)

          at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)

          at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)

          at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)

          at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)

          at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)

          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)

          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)

          at java.rmi.MarshalledObject.get(MarshalledObject.java:135)

          at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)

          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)

          ... 5 more

        • 1. Re: JMS Queue in Jboss
          Wolf-Dieter Fink Master

          I suppose you use a standalone client.

           

          You should add the client JARs to the java classpath, see JBOSS/client (AS5 6 7 ).

          If you use AS7 it will be different and you should try the quickstarts examples. See AS7 documentation for this.

          • 2. Re: JMS Queue in Jboss
            noboundaries Newbie

            Thanks for the response that solves the issue. I am using jboss-5.1.0.GA. Tried with jnp-client.jar and jboss-client.jat but experienced the same issue. Adding all 93 item from jboss-5.1.0.GA\jboss-5.1.0.GA\client solved the issue. Can you please let me know how to find the specific that required on this?

            • 3. Re: JMS Queue in Jboss
              Wolf-Dieter Fink Master

              Depend on you requirements, i.e. transport type, security ....

              So I use normally jbossall-client.jar or check by try-and-error which ClassNotFoundEx are thrown.

              1 of 1 people found this helpful
              • 4. Re: JMS Queue in Jboss
                noboundaries Newbie

                Startered the same application through a servlet and got the below

                 

                -------------------------------------------------------------------

                HTTP Status 500 -

                 

                 

                type Exception report

                 

                 

                message

                 

                 

                description The server encountered an internal error () that prevented it from fulfilling this request.

                 

                 

                exception

                 

                 

                javax.servlet.ServletException: Error instantiating servlet class com.corent.jmsjbossmq.ListenerSample

                          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

                          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                          java.lang.Thread.run(Thread.java:595)

                root cause

                 

                 

                java.lang.InstantiationException: com.corent.jmsjbossmq.ListenerSample

                          java.lang.Class.newInstance0(Class.java:335)

                          java.lang.Class.newInstance(Class.java:303)

                          org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:264)

                          org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)

                          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

                          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                          java.lang.Thread.run(Thread.java:595)

                • 5. Re: JMS Queue in Jboss
                  noboundaries Newbie

                  Got it worked by removing the duplicate JARs that caused the issue.