13 Replies Latest reply on May 27, 2011 1:49 PM by clebert.suconic

    hornetq-2.2.2.Final compatability with jboss-6.0.0.Final

    kapilnikhra

      We are running jboss-6.0.0.Final and connecting to  standalong hornetQ installation running on version hornetq-2.1.2.Final.  We upgraded hornetQ installation to the new version hornetq-2.2.2.Final (becasue of some bug fix we were looking for), but when we try connect from jboss we get the following error.

       

      13:44:05,267 WARNING [org.hornetq.core.protocol.core.impl.HornetQPacke

      tHandler]  Client with version 120 and address /127.0.0.1:65514 is not compatibl

      e with server version 2.2.2.Final (super-hornetq-fighter, 122). Please ensure al

      l clients and servers are upgraded to the same version for them to interoperate

      properly

      [Old I/O server worker (parentId: 693781795, [id: 0x295a4523, localhost/127.0.0.

      1:5447])] 13:44:05,272 SEVERE [org.hornetq.core.protocol.core.impl.HornetQPacket

      Handler]  Failed to create session

      HornetQException[errorCode=108 message=Server and client versions incompatible]

              at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreate

      Session(HornetQPacketHandler.java:151)

              at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket

      (HornetQPacketHandler.java:84)

              at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelI

      mpl.java:474)

              at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferRe

      ceived(RemotingConnectionImpl.java:496)

              at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferRece

      ived(RemotingConnectionImpl.java:457)

              at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingB

      ufferHandler.bufferReceived(RemotingServiceImpl.java:459)

              at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageRec

      eived(HornetQChannelHandler.java:73)

              at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleCha

      nnelHandler.java:100)

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChan

      nelPipeline.java:362)

              at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerCon

      text.sendUpstream(StaticChannelPipeline.java:514)

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:28

      7)

              at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(Horn

      etQFrameDecoder2.java:169)

              at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageRece

      ived(HornetQFrameDecoder2.java:134)

              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S

      impleChannelUpstreamHandler.java:80)

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChan

      nelPipeline.java:362)

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChan

      nelPipeline.java:357)

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:27

      4)

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26

      1)

              at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90)

              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl

      e.java:108)

              at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.j

      ava:46)

              at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run

      (VirtualExecutorService.java:181)

              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)

       

      Can anyone tell me what libraries in jboss we need to upgrade to enable jboss to talk to hornetq-2.1.2.Final

        • 1. hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
          clebert.suconic

          you need to upgrade hornetq-core-client, hornetq-jms-client on the client.

           

          From 2.2+ we are keeping compatibility on the protocol.

          • 2. hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
            kapilnikhra

            I overrode the jars(hornetq-core-client, hornetq-jms-client)  in  JBOSS_HOME/client with  2 jars  from lib directory of  hornetq-2.2.2.Final, but still it does not resolve the issue. HornetQ still gives the same error.

            • 3. hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
              clebert.suconic

              I'm not sure what kind of mess you are making with these jars.

               

               

              the thing is pretty straightforward. You run 2.2 on the server, you have to run 2.2 on the client

               

               

              you run 2.1.2 on the server, you have to run 2.1.2 on the client.

               

               

               

              I can't help you debug your copy files.

              • 4. hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                kapilnikhra

                I reinstalled jboss and copied the jars file (hornetq-core-client, hornetq-jms-client) again  from  hornetq-2.2.2.Final to  JBOSS/client (overwriting the ones already there in Jboss), but still was getting the same version incompatibility error.

                 

                I then replaced the following jar files from Jboss/common/lib with the ones from hornetq-2.2.2.Final/lib  and was able to connect to a standlone instance of hornetq-2.2.2.Final

                 

                hornetq-bootstrap,hornetq-core,hornetq-jboss-as-integration,hornetq-jms,hornetq-logging

                 

                When i restarted jboss it shows the HornetQServerImpl version 2.2.2.Final started.

                 

                Another observation i had was, removing the jars hornetq-core-client, hornetq-jms-client from JBOSS/client has no effect and i am able to put and receive messages even after removing these jars from jboss.

                 

                Please help me figure out if there is any dependency on the internal verion of HornetQ in jboss and the external standalone version(s) it can connect to.

                • 5. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                  clebert.suconic

                  kapil nikhra wrote:

                   

                   

                   

                  Another observation i had was, removing the jars hornetq-core-client, hornetq-jms-client from JBOSS/client has no effect and i am able to put and receive messages even after removing these jars from jboss.

                   

                  Please help me figure out if there is any dependency on the internal verion of HornetQ in jboss and the external standalone version(s) it can connect to.

                   

                   

                  Isn't that kind of obvious? /client => client!  That is to be used at your client. the server is not affected even if you remove the whole directory.

                   

                   

                  As I said.. I can't help anyone with how to copy jars. Just copy the correct jars at ./common/lib and /client/lib. (whatever those places are)

                  • 6. hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                    kapilnikhra

                    What i am saying is that Jboss ( which is acting as a client) to hornetq-2.2.2.Final( which is my queue server) is able to work without having client libraries ? does'nt that seem strange.

                     

                    To make jboss ( the client) talk to hornetq-2.2.2.Final(Server)  i have to replace the hornetQ server libraries in jboss( which i suppose are meant for the hornetQ deployed within jboss) with the libraries from hornetq-2.2.2.Final.

                     

                    Effectively i had to upgrade the internal hornetq installation within jboss to hornetq-2.2.2.Final for it to be able to act as a client for hornetq-2.2.2.Final server ?

                    • 7. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                      greyfairer2

                      Well duh!

                       

                      The hornetq-* jars also include the classes in hornetq-*-client jars.

                      And any application running in jboss uses the jars in commons/lib, not those in client/lib.

                       

                      Apparently the hornetq beans configuration in JBoss6 is compatible, otherwise you would see errors.

                       

                      Greets, Geert.

                      • 8. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                        clebert.suconic

                        Clients are remote clients on JBoss. Everything running inside the VM is considered a server.

                         

                        If you don't have remote clients.. you could even remove the jboss/client dir (AFAIK at least). That's more an utility directory serving as the place you get your libraries for your clients.

                        • 9. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                          kapilnikhra

                          So to make my application running in jboss 6.0 talk to a external standalone hornetq-2.2.2.Final i will have to upgrade the hornetq libs ( hornetq-bootstrap,hornetq-core,hornetq-jboss-as-integration,hornetq-jms,hornetq-logging) in jboss commons/lib with hornetq-2.2.2.Final version and not the hornetq-core-client, hornetq-jms-client jars.

                          • 10. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                            clebert.suconic

                            I didn't understand what you said... what you want to upgrade?

                             

                            You just need the same version at /common/lib and /client

                             

                             

                            As I said.. it's just a copy to the client

                            • 11. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                              kapilnikhra

                              I am reinstating my problem.

                               

                              I have an application deployed in JBOSS 6.0 and it was talking to a hornetQ standalone version 2.1.2.final (deployed outside jboss on a seperate machine)  and things where working fine except i was facing  the journal bug on message rollback and  so decided to upgrade my standalone hornetQ instaltion to 2.2.2.final ( as the bug seems to be fixed in that release).

                               

                              To make my application talk to the new upgraded queue installation i upgraded the hornetq-core-client, hornetq-jms-client libs in jboss ( according to a earlier suggestion), but that did'nt work as apparently these jars are not used by jboss.

                               

                              I did some playing around and found if i ugraded the hornetq jars in jboss common/lib directory ( the  6 jars mentioned in my earlier posts) , i am able to make my application talk to the hornetQ version 2.2.2.final. Thankfully this got rid of the journal bug and i have not found any issue since than.

                               

                              my question is, is this the right way to upgrade jboss to enable the applications deployed within it to talk to hornqtQ version 2.2.2.final, as this in effect upgrades the hornetQ instllation embedded within jboss to 2.2.2.final ?

                              • 12. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                                clebert.suconic

                                ok.. .you need to upgrade all the hornetq libraries on /commons/lib.

                                 

                                 

                                You should probably get a AS6 snapshot.

                                • 13. Re: hornetq-2.2.2.Final compatability with jboss-6.0.0.Final
                                  clebert.suconic

                                  You could also deploy the Resource Adapter for hornetq-2.2 with a different name and have the jars isolated (class loading would isolate it).

                                   

                                  I'm not sure if it's worth the time. If you can just upgrade your server you will have less hassle on managing versions.

                                  1 of 1 people found this helpful