5 Replies Latest reply on Sep 30, 2010 8:14 AM by clebert.suconic

    java.lang.IllegalAccessError: This is a read-only buffer, setOperations are not supported

    veitg

      Hi.

       

      We're using HornetQ 2.1.2 with JBoss 5.1.0.

       

      In a redelivery usecase we receive a message in a MDB, change its properties and send it to another queue. To make this

      work, we call the clearProperties() method on the message and re-set the values. As mentioned in  the javax.jms.Message javadoc this is allowed:

       

      "If   clearProperties is called, the properties can now be both  read from and written to"

       

      That indeed works with small messages. But when we use messages >100kb we get the following from the HornetQ server:

       

      Caused by: java.lang.IllegalAccessError: This is a read-only buffer, setOperations are not supported
          at org.hornetq.core.client.impl.LargeMessageBufferImpl.writeInt(LargeMessageBufferImpl.java:949)
          at org.hornetq.jms.client.HornetQObjectMessage.doBeforeSend(HornetQObjectMessage.java:93)
          at org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:426)
          at org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:199)
          at org.hornetq.ra.HornetQRAMessageProducer.send(HornetQRAMessageProducer.java:221)

       

      Is this a bug?

       

      BTW: this also happens with trunk.