4 Replies Latest reply on Feb 9, 2015 10:21 AM by Justin Bertram

    How to upgrade HornetQ version in JBoss 6?

    Ritesh Ranpara Newbie

      Hi All,

       

      I am using JBoss-6.0.0 AS which by default comes with HornetQ-2.1.2 version but this version of HornetQ has many Iteration related bugs which are now resolved in HornetQ-2.2.5 version which by default comes with JBoss 7 AS.

       

      I can't switch to JBoss 7 AS because I am already using many other services specific to JBoss 6 AS and it would be very risky for us to switch to JBoss 7 AS as of now. 

       

      Is there anyway by which I can upgrade HornetQ version in JBoss 6 AS ?

      I tried with standalone HornetQ-2.2.5 by running it as different process, but with that JBoss JMX Console is not available.

       

      Any suggestion is appreciated for this.

      Please let me know if I am missing something here.

       

       

      Thanks.

        • 1. Re: How to upgrade HornetQ version in JBoss 6?
          Billy Sjöberg Newbie

          This worked for me:

          Note that I did not overwrite jnpserver.jar as when I tried that the AS JNDI got spunky... The old one worked fine (AFAIK) with the new Hornet libs.

           

          1. Delete message journal since the file format for 2.2.5 is not backwards compatible ($JBOSS_HOME/server/<profile>/data/hornetq)
          2. Delete existing JMS Resource adapter jms-ra.rar folder under /deploy
          3. Copy libs from HornetQ pack to $JBOSS_HOME/common/lib. The jars to copy are:
            1. hornetq-bootstrap.jar
            2. hornetq-core.jar
            3. hornetq-jboss-as-integration.jar
            4. hornetq-jms.jar
            5. hornet-logging.jar
            6. netty.jar
          4. Copy resource adapter from hornetq pack to /deploy and rename it from hornetq-ra.rar to jms-ra.rar (effectively replacing old version in step 2 above)
          5. Copy client libs from HornetQ pack to $JBOSS_HOME/client. The jars to copy are:
            1. hornetq-core-client.jar
            2. hornetq-jms-client.jar
            3. netty.jar

           

          Also note that clients (apps and i.e. HermesJms) will need the new client JAR’s as the transport protocol MAY not be backwards compatible.

          Configurations under /deploy/hornetq does not need to be updated, the old ones works fine.

          • 2. Re: How to upgrade HornetQ version in JBoss 6?
            jaikiran pai Master

            FWIW, AS6 trunk has been upgraded to 2.2.5.Final of HornetQ, a few minutes back. It will be available in the nightly builds http://community.jboss.org/thread/161386 shortly.

            • 3. Re: How to upgrade HornetQ version in JBoss 6?
              Kiran Srimat Kandala Newbie

              Hi,

               

                 I am using JBoss EAP 6.2.0.GA . I dont find directories mentioned above. But i have replaced all hornetq jars in the following location with updated version (2.4.1), i am looking at

               

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-jms-server-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-server-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-jms-client-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-commons-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-core-client-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/main/hornetq-journal-2.3.12.Final-redhat-1.jar

              jboss-eap-6.2/modules/system/layers/base/org/hornetq/ra/main/hornetq-ra-2.3.12.Final-redhat-1.jar

               

              But i am getting follwowing exception while starting the server.

               

              09:38:51,636 WARN  [org.jboss.modules] (ServerService Thread Pool -- 3) Failed to define class org.hornetq.api.config.HornetQDefaultConfiguration in Module "org.hornetq:main" from local module loader @1f297e7 (finder: local module finder @1d2fc36 (roots: /usr/local/jboss-eap-6.2/modules,/usr/local/jboss-eap-6.2/modules/system/layers/base)): java.lang.UnsupportedClassVersionError: org/hornetq/api/config/HornetQDefaultConfiguration : Unsupported major.minor version 51.0

                at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]

                at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]

                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

                at org.jboss.as.messaging.CommonAttributes.<clinit>(CommonAttributes.java:82) [jboss-as-messaging-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.messaging.QueueDefinition.<clinit>(QueueDefinition.java:68) [jboss-as-messaging-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.messaging.Element.<clinit>(Element.java:49) [jboss-as-messaging-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_45]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_45]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_45]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_45]

                at java.lang.Class.getEnumConstantsShared(Class.java:2951) [rt.jar:1.6.0_45]

                at java.lang.System$2.getEnumConstantsShared(System.java:1140) [rt.jar:1.6.0_45]

                at java.util.EnumSet.getUniverse(EnumSet.java:371) [rt.jar:1.6.0_45]

                at java.util.EnumSet.noneOf(EnumSet.java:91) [rt.jar:1.6.0_45]

                at org.jboss.as.messaging.MessagingSubsystemParser.<clinit>(MessagingSubsystemParser.java:101) [jboss-as-messaging-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.messaging.MessagingExtension.initializeParsers(MessagingExtension.java:239) [jboss-as-messaging-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:182) [jboss-as-controller-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:68) [jboss-as-controller-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:126) [jboss-as-controller-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:123) [jboss-as-controller-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_45]

                at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_45]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final-redhat-1.jar:2.1.1.Final-redhat-1]

               

              Any suggestions?

               

              Thanks!

              • 4. Re: How to upgrade HornetQ version in JBoss 6?
                Justin Bertram Master

                Looks like HornetQ was compiled with a newer JDK than what you're using to actually run it.

                 

                In any event, HornetQ 2.4.x is likely not compatible with the messaging subsystem in EAP 6.x.  I recommend you stick with the 2.3.x branch of HornetQ.