Hi everyone

We are performing some tests with different broker versions (4.1.1, 4.2-SNAPSHOT, 5.0-SNAPSHOT). In one particular test, we had 1 message remaining on a queue, persisted over DB with JDBC. The broker was the 4.2. Later, we changed the broker to the 5.0, and started it. When trying to consume that message, we got an exception (full stack below):

java.lang.NegativeArraySizeException
at org.apache.activemq.openwire.v3.MessageMarshaller.looseUnmarshal(MessageMarshaller.java:247)

This raises a question: what happens with old persisted messages when moving to a newer broker version? Is there a need for a special migrating procedure?

Thank you and best regards
Eduardo Corral

Full exception:

java.lang.NegativeArraySizeException
at org.apache.activemq.openwire.v3.MessageMarshaller.looseUnmarshal(MessageMarshaller.java:247) at org.apache.activemq.openwire.v3.ActiveMQMessageMarshaller.looseUnmarshal(ActiveMQMessageMarshaller.java:101) at org.apache.activemq.openwire.v3.ActiveMQObjectMessageMarshaller.looseUnmarshal(ActiveMQObjectMessageMarshaller.java:101) at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:351) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:206) at org.apache.activemq.store.jdbc.JDBCMessageStore$2.recoverMessage(JDBCMessageStore.java:239) at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:677) at org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:234) at org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:80) at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.fillBatch(QueueStorePrefetch.java:159) at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.hasNext(QueueStorePrefetch.java:110) at org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:122)
       at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1007)
       at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:992)
at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:215) at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:241) at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:341) at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:87) at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:79) at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:87) at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:97) at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:566) at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:313) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:282) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133) at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:126) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
       at java.lang.Thread.run(Thread.java:595)


Reply via email to