3 Replies Latest reply on Feb 13, 2013 6:54 PM by Clebert Suconic

    javax.jms.JMSException: invalid stream header: 47000000 2.2.13 (Jboss7)

    kperry Newbie



      We have are following a request/result pattern using temporary queues.  Our workflow is something like:


      1. Create temp queue
      2. Create Object Message and set reply queue as temp queue
      3. Send to worker (named) queue using a producer  (this queue resides on a different machine and is remote)
      4. Create a consumer and wait until worker queue is finished
      5. When finished in the worker queue, (last step of onMessage), we send back to the reply queue (the temporary queue created in step


      When the consumer receives the message, we call getObject - this is where we receive the error below.

      This particular message appears to be around 130KB (close to the default min-large-message-size).  We can duplicate the error with this particular request, but about half the time, it works (no exception) - very strange.  We have other messages that are much smaller and much larger, but we haven't seen any issues with them.  This appears to be a problem with hornetq, but I have no idea what setting to tweak.  We did make sure that we are using the correct journal-file-size (https://community.jboss.org/message/780717#780717).



      Caused by: javax.jms.JMSException: invalid stream header: 47000000

                at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782) [rt.jar:1.6.0_31]

                at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279) [rt.jar:1.6.0_31]

                at org.hornetq.utils.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:40) [hornetq-core-2.2.13.Final.jar:]

                at org.hornetq.jms.client.HornetQObjectMessage.getObject(HornetQObjectMessage.java:157) [hornetq-jms-2.2.13.Final.jar:]

                at com.xxxxx.xxxxxx.ws.xxxxxxProducer.getxxxxxxxResultsQueue(xxxxxxxxProducer.java:72) [classes:]

                at com.xxxxx.xxxx.ws,xxxxxxxWs.getxxxxxxxResult(xxxxxxxWs.java:96) [classes:]

                ... 43 more