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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • AMQ 7.2.0.GA
    • AMQ 7.0.3.GA
    • None
    • None
    • Release Notes
    • 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 ].
    • Documented as Resolved Issue
    • 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.
    • 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)

      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
      

              gaohoward Howard Gao
              rhn-support-pfox Patrick Fox (Inactive)
              Stanislav Knot Stanislav Knot (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: