10 Replies Latest reply on Feb 9, 2010 2:25 PM by metrowebinc

    Does this jar dependency list seem right?

      I am trying to get a HornetQ 2.0 Client started and I just want to make sure that this is the right jar list:

       

      hornetq-core-client.jar

      hornetq-jms-client.jar

      hornetq-transwports.jar

      jboss-jms-api.jar

      jbossall-client-3.2.1.jar

      jnp-client.jar

      netty.jar

       

      The one I am really not sure about is the jbossall-client-3.2.1.jar. If I remove it though I get the following exception:

       

      Caused by: java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)

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

      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:1575)

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

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

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

      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)

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

      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

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

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

      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

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

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

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

      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)

      ... 6 more

       

      I am trying to run HornetQ 2.0 standalone server, a JMS client using JNDI Server for lookups. Recommendations or suggestions welcome.

       

      Thank you in advance

        • 1. Re: Does this jar dependency list seem right?
          timfox

          I guess you didn't think of looking in the user manual?

           

          There's a whole chapter about exactly what jars you need on your classpath:

           

          http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html/client-classpath.html

          • 2. Re: Does this jar dependency list seem right?
            I did, thus my question on the jbossall-client-3.2.1.jar. I don't see it mentioned there. right back at yah!
            • 3. Re: Does this jar dependency list seem right?
              timfox

              Where did you get jbossall-client.jar from?

               

              This is not a jar that we distribute with HornetQ...

               

              Like it says in the user manual, all the jars you need are in the lib directory of the HornetQ distribution:

               

              "All the jars mentioned here can be found in the lib directory of             the HornetQ distribution. Be sure you only use the jars from the correct version of the             release, you must not mix and match versions of jars from different             HornetQ versions. Mixing and matching different jar versions may cause subtle errors and             failures to occur."

               

              [Actually I know where jbossall-client.jar from - this is a client jar distributed in the jboss app server distribution - not part of HornetQ]

              • 4. Re: Does this jar dependency list seem right?

                This is what I get with just using those jars:

                 

                Caused by: java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)

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

                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:1575)

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

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

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

                at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)

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

                at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

                at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

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

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

                at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

                at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

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

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

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

                at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)

                at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)

                ... 6 more

                 

                Just to disclose all I am also using XMLBeans.jar.

                • 5. Re: Does this jar dependency list seem right?
                  timfox

                  That's interesting:

                   

                  org.jboss.mq.* are classes from JBoss MQ which was the old JMS provider in JBoss AS 4.x.

                   

                  Probably what you've done is you've mixed and matched jars from an old JBoss AS 4.x distribution with those from the HornetQ distro that happen to have the same names.

                   

                  I'd start again and recopy the jars from the HornetQ distro.

                   

                  If the problem still occurs then can you post a small test program with instructions to replicate, that demonstrates the issue.

                  • 6. Re: Does this jar dependency list seem right?

                    Okay, I have finally gotten around to making it back on task. I am attaching a small demo program. Don't laugh . But, you will notice that the project just pulls the jars right out of the hornetq directory that I am using so the jar dependency is not included with the project.

                     

                    Thanks for the help btw,

                     

                    Michael

                    • 7. Re: Does this jar dependency list seem right?
                      timfox

                      I looked at your code, I'm confused - it's just trying to do a JNDI lookup - there's no messaging code in there, it doesn't help us at all.

                       

                      If you're having trouble getting a JNDI lookup to work, take a look at the examples in the distro, there are many examples which do JNDI lookups against standalone HornetQ servers, see if they work for you.

                       

                      If they do, study them and see what the difference in setup there is between yours and them.

                      • 8. Re: Does this jar dependency list seem right?
                        timfox

                        I suspect what you've done is you've pointed your server at a JBoss Application Server instance: (!)

                         

                        context.addToEnvironment("java.naming.provider.url", "jnp://blaketastic.synergies4u.org:1099");

                         

                        Instead of point it to the url of the HornetQ server.

                         

                        Consequently when you try to lookup the connection factory it's trying to use the old JBoss MQ connection factory configured on the AS.

                         

                        You need to point your client at the correct url.

                        • 9. Re: Does this jar dependency list seem right?
                          timfox
                          Please post the server configuration files for the HornetQ instance you're trying to point your client up for the JNDI lookup
                          • 10. Re: Does this jar dependency list seem right?

                            Figured out my problem. The connectors and acceptors were not matching on my server configuration. This blog entry actually helped me out:

                             

                            http://hornetq.blogspot.com/2009/10/understanding-connectors-acceptors.html

                             

                             

                            Thanks for all the responses