NPE in org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightMarshalByteSequence2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NPE in org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightMarshalByteSequence2

hanneshof92
Hi,

I am currently developing an ActiveMQ broker plugin which is intercepted
and override the
BrokerPluginSupport.preProcessDispatch() and BrokerPluginSupport.send()
methods to perform
some operation on the messge object. When I setup a scenario with an
embedded broker with one producer on the topic 'Foo'
and one consumer on the topic 'Foo' everything works fine. But when another
consumer is added on
the same topic the following exception occurs while the producer sends some
messages:

 INFO | [MATCHED_1000K] java.lang.NullPointerException
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightMarshalByteSequence2(BaseDataStreamMarshaller.java:430)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.MessageMarshaller.tightMarshal2(MessageMarshaller.java:182)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.ActiveMQMessageMarshaller.tightMarshal2(ActiveMQMessageMarshaller.java:89)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.ActiveMQObjectMessageMarshaller.tightMarshal2(ActiveMQObjectMessageMarshaller.java:89)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.OpenWireFormat.tightMarshalNestedObject2(OpenWireFormat.java:427)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightMarshalNestedObject2(BaseDataStreamMarshaller.java:135)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.v12.MessageDispatchMarshaller.tightMarshal2(MessageDispatchMarshaller.java:105)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:235)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:193)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:335)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:317)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:94)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:116)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1492)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:981)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.broker.TransportConnection.iterate(TransportConnection.java:1027)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
 INFO | [MATCHED_1000K]     at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
 INFO | [MATCHED_1000K]     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 INFO | [MATCHED_1000K]     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 INFO | [MATCHED_1000K]     at java.lang.Thread.run(Thread.java:745)
 INFO | [MATCHED_1000K] JMS Exception occured.  Shutting down client.
(Unexpected error occurred: java.lang.ClassCastException:
org.apache.activemq.command.BrokerId cannot be cast to
org.apache.activemq.command.ConsumerId)

 Could someone tell me what is going on here?

 Regards,
 Hannes

## Plugin and clients are built using activemq 5.14.2.
Loading...