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

Solution Verified - Updated -

Issue

  • 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

Environment

  • JBoss AMQ 7.0.2
  • JBoss AMQ 7.0.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content