Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12187

[7.1] Migration - serialVersionUID of JMSException has changed from JMS 1.1 to JMS 2.0

XMLWordPrintable

      As described in [1] there serialization issue of older JMS 1.1 exceptions between JMS 1.1 and JMS 2.0.0 because they have different serialVersionUID.

      For example if JMS 1.1 client sends ObjectMessage with JMSException to Artemis/HornetQ and JMS 2.0.0 client receives it and tries to deserialize this JMSException then following exception is thrown:

      javax.jms.JMSException: javax.jms.JMSException; local class incompatible: stream classdesc serialVersionUID = 8951994251593378324, local class serialVersionUID = 2368476267211489441
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:616)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
      at org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:153)
      at ReceiverTransAck.run(ReceiverTransAck.java:85)

      serialVersionUID in JMS 2.0 spec was fixed and new version 2.0.1 was released. JMS 2.0.1 is now compatible with JMS 1.1 but JMS 2.0.0 spec is not compatible with 1.1 and 2.0.1 in context of those JMS exceptions.

      [1] https://github.com/javaee/openmq/issues/359#issuecomment-300257172

              sgilda_jira Sande Gilda (Inactive)
              mnovak1@redhat.com Miroslav Novak
              Miroslav Novak Miroslav Novak
              Miroslav Novak Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: