9 Replies Latest reply on Aug 29, 2013 7:16 PM by Justin Bertram

    How to upgrade HornetQ version in JBoss 7

    Petros Baltzis Newbie

      Hi all,

       

      I am using jboss-as-7.1.1.Final which has embedded the hornetQ server version 2.2.13.Final. I want to upgrade the version of hornetQ to 2.3.0 CR1. How can i do this?

       

      Thanks.

        • 1. Re: How to upgrade HornetQ version in JBoss 7
          Yong Hao Gao Master

          I think you can try build the as7 yourself (updating the version of hornetq in its pom.xml).

          • 2. Re: How to upgrade HornetQ version in JBoss 7
            Andy Taylor Master

            that probably won't work, there have been integration changes. Your best bet is to wait for AS7.2 which is due shortly or build AS7 master yourself, this uses CR1

            1 of 1 people found this helpful
            • 3. Re: How to upgrade HornetQ version in JBoss 7
              Justin Bertram Master

              You can also get a nightly build from https://community.jboss.org/thread/167590.  It beats having to build it yourself.

              • 4. Re: How to upgrade HornetQ version in JBoss 7
                John Muhlestein Newbie

                Is this the final word?  HornetQ-2.3.0.Final is NOT compatible with JBoss-7.1.x?

                 

                I've tried switching out the way the modules.xml file and included jars similar to jboss-eap-6.1 looks, and get the following error:

                 

                Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchFieldError: DEFAULT_MANAGEMENT_ADDRESS

                        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) [rt.jar:1.6.0_31]

                        at java.util.concurrent.FutureTask.get(FutureTask.java:83) [rt.jar:1.6.0_31]

                        at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:146) [jboss-as-controller-7.1.2.Final.jar:7.1.2.Final]

                        ... 9 more

                Caused by: java.lang.NoSuchFieldError: DEFAULT_MANAGEMENT_ADDRESS

                        at org.jboss.as.messaging.CommonAttributes.<clinit>(CommonAttributes.java:354)

                        at org.jboss.as.messaging.Element.<clinit>(Element.java:45)

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

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

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

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

                        at java.lang.Class.getEnumConstantsShared(Class.java:2942) [rt.jar:1.6.0_31]

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

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

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

                        at org.jboss.as.messaging.MessagingSubsystemParser.<clinit>(MessagingSubsystemParser.java:133)

                        at org.jboss.as.messaging.MessagingExtension.initializeParsers(MessagingExtension.java:342)

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

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

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

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

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

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

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

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

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

                        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

                • 5. Re: How to upgrade HornetQ version in JBoss 7
                  Justin Bertram Master

                  Yes, that's the final word (and has been for awhile).

                   

                  FYI - The messaging subsystem in EAP 6.1 is quite a bit different than the one in JBoss AS 7.1.x. 

                  • 6. Re: How to upgrade HornetQ version in JBoss 7
                    John Muhlestein Newbie

                    I'm experiencing a similar problem as above, this time I am running AS7.2 and am attempting to upgrade from HornetQ 2.3.0 to 2.3.3.Final to test some fixes. 

                     

                    I have added all the jar files and modified the module.xml files related to hornetq to use the 2.3.3.Final jar files

                     

                    When I try to start the app server I get the following error (Seems to be linked to the DEFAULT_MANAGEMENT_ADDRESS field.  I looked in the source, and the field is private on that class.)

                    In my standalone.xml   I have the following 2 tags related to management address

                     

                    <management-address>jms.queue.hornetq.management</management-address>

                     

                    and

                     

                    <security-setting match="jms.queue.hornetq.management">

                       <permission type="manage" roles="guest"/>

                    </security-setting>

                     

                    ERROR BELOW:

                     

                    2013-08-29 14:29:23,400 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration

                            at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.server.ServerService.boot(ServerService.java:308) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:188) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

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

                    Caused by: javax.xml.stream.XMLStreamException: JBAS014674: Failed to load module org.jboss.as.messaging

                            at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:154) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:424) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:136) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]

                            at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            ... 3 more

                    Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access field org.hornetq.api.config.HornetQDefaultConfiguration.DEFAULT_MANAGEMENT_ADDRESS from class org.jboss.as.messaging.CommonAttributes

                            at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) [rt.jar:1.6.0_31]

                            at java.util.concurrent.FutureTask.get(FutureTask.java:83) [rt.jar:1.6.0_31]

                            at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:146) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            ... 9 more

                    Caused by: java.lang.IllegalAccessError: tried to access field org.hornetq.api.config.HornetQDefaultConfiguration.DEFAULT_MANAGEMENT_ADDRESS from class org.jboss.as.messaging.CommonAttributes

                            at org.jboss.as.messaging.CommonAttributes.<clinit>(CommonAttributes.java:428)

                            at org.jboss.as.messaging.QueueDefinition.<clinit>(QueueDefinition.java:62)

                            at org.jboss.as.messaging.Element.<clinit>(Element.java:49)

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

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

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

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

                            at java.lang.Class.getEnumConstantsShared(Class.java:2942) [rt.jar:1.6.0_31]

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

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

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

                            at org.jboss.as.messaging.MessagingSubsystemParser.<clinit>(MessagingSubsystemParser.java:101)

                            at org.jboss.as.messaging.MessagingExtension.initializeParsers(MessagingExtension.java:223)

                            at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:182) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:68) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:126) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:123) [jboss-as-controller-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

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

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

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

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

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

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

                    • 7. Re: How to upgrade HornetQ version in JBoss 7
                      Justin Bertram Master

                      The "messaging" subsystem in AS7/EAP6 is pretty tightly coupled with the version of HornetQ it ships with by default.  Moving versions will not necessarily work.

                      • 8. Re: How to upgrade HornetQ version in JBoss 7
                        John Muhlestein Newbie

                        Seems like a bit of a flaw. 

                         

                        Any recommendations on how to test newer releases of HornetQ?

                        Is there going to be an App Server release then to correspond with HornetQ updates?

                        • 9. Re: How to upgrade HornetQ version in JBoss 7
                          Justin Bertram Master

                          Seems like a bit of a flaw.

                          It can be inconvenient sometimes in situations like this, but the design decision enables other use-cases whose value outweighs the inconvenience.

                           

                          Any recommendations on how to test newer releases of HornetQ?

                          Fork either HornetQ or WildFly (or both) and just apply the fixes you need.

                           

                          Is there going to be an App Server release then to correspond with HornetQ updates?

                          WildFly master already has HornetQ 2.4.0.Beta1.  Fork it and build it yourself (instructions) or pull the latest nightly.