Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-943

[AMQ7, Openwire, Compression] consuming openwire compressed bytemessage throws java.util.zip.DataFormatException: incorrect header check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.0.3.GA
    • Fix Version/s: AMQ 7.2.0.GA
    • Component/s: None
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide

      Unit test attached ( see test method testCompression())

      OR

      manual steps

      • create a standard AMQ7.0.3 broker instance
      • extract attached simple_amq_client.tar
      • in the dir simple_amq_client execute the following commands
      1. mvn install
      2. mvn exec:java -Dexec.mainClass=com.mysample.ByteMessagesProducer
      3. mvn exec:java -Dexec.mainClass=com.mysample.ByteMessagesConsumer (this should result in exception below)
      Show
      Unit test attached ( see test method testCompression()) OR manual steps create a standard AMQ7.0.3 broker instance extract attached simple_amq_client.tar in the dir simple_amq_client execute the following commands mvn install mvn exec:java -Dexec.mainClass=com.mysample.ByteMessagesProducer mvn exec:java -Dexec.mainClass=com.mysample.ByteMessagesConsumer (this should result in exception below)
    • Affects:
      Release Notes
    • Workaround Description:
      Hide

      It seems when both " the message has a property set" AND "use compression" are used the issue occurs. If only one of those is used it seems to work.

      Potential workaround is to turn off compression.

      Show
      It seems when both " the message has a property set" AND "use compression" are used the issue occurs. If only one of those is used it seems to work. Potential workaround is to turn off compression.
    • Release Notes Text:
      Hide
      Previously, when using the OpenWire protocol to send small, compressed ByteMessages that have JMS properties set for a queue, an exception was thrown on the consumer side when it attempted to decompress the message. See the Knowledge Base article on the Red Hat Customer Portal for more details: link:https://access.redhat.com/solutions/3269061[https://access.redhat.com/solutions/3269061].
      Show
      Previously, when using the OpenWire protocol to send small, compressed ByteMessages that have JMS properties set for a queue, an exception was thrown on the consumer side when it attempted to decompress the message. See the Knowledge Base article on the Red Hat Customer Portal for more details: link: https://access.redhat.com/solutions/3269061 [ https://access.redhat.com/solutions/3269061 ].
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      Sending a (small) compressed Openwire ByteMessages with JMS properties set to a Queue causes the following exception on the consumer side when it tries to decompress the message.

      javax.jms.JMSException: java.util.zip.DataFormatException: incorrect header check
      	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
      	at org.apache.activemq.command.ActiveMQBytesMessage.initializeReading(ActiveMQBytesMessage.java:884)
      	at org.apache.activemq.command.ActiveMQBytesMessage.getBodyLength(ActiveMQBytesMessage.java:198)
      	at com.mysample.ByteMessagesConsumer.doit(ByteMessagesConsumer.java:69)
      	at com.mysample.ByteMessagesConsumer.main(ByteMessagesConsumer.java:22)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: java.util.zip.DataFormatException: incorrect header check
      	at org.apache.activemq.command.ActiveMQBytesMessage.decompress(ActiveMQBytesMessage.java:902)
      	at org.apache.activemq.command.ActiveMQBytesMessage.initializeReading(ActiveMQBytesMessage.java:876)
      	... 9 more
      Caused by: java.util.zip.DataFormatException: incorrect header check
      	at java.util.zip.Inflater.inflateBytes(Native Method)
      	at java.util.zip.Inflater.inflate(Inflater.java:259)
      	at java.util.zip.Inflater.inflate(Inflater.java:280)
      	at org.apache.activemq.command.ActiveMQBytesMessage.decompress(ActiveMQBytesMessage.java:898)
      	... 10 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gaohoward Yong Hao Gao
                  Reporter:
                  pfox Pat Fox
                  Tester:
                  Stanislav Knot
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: