You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by MarcelHillmann <ma...@allianz.de> on 2017/12/04 10:38:52 UTC

ClassCastException: Consumer Advisory Topic

Hi,

I try to subscribe the connection advisory topic, and I seen an
ClassCastException.

Is this a known issue? 
How can I solve it?

Thanks
Marcel

java.io.IOException: org.apache.activemq.command.BrokerId cannot be cast to
org.apache.activemq.command.ConsumerId
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:40)
	at
org.apache.activemq.transport.nio.NIOTransport.serviceRead(NIOTransport.java:168)
	at
org.apache.activemq.transport.nio.NIOTransport$1.onSelect(NIOTransport.java:80)
	at
org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:98)
	at
org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:118)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException:
org.apache.activemq.command.BrokerId cannot be cast to
org.apache.activemq.command.ConsumerId
	at
org.apache.activemq.openwire.v12.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:75)
	at
org.apache.activemq.openwire.v12.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66)
	at
org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(OpenWireFormat.java:456)
	at
org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:125)
	at
org.apache.activemq.openwire.v12.MessageDispatchMarshaller.tightUnmarshal(MessageDispatchMarshaller.java:71)
	at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:365)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:278)
	at
org.apache.activemq.transport.nio.NIOTransport.serviceRead(NIOTransport.java:154)
	... 6 more



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: ClassCastException: Consumer Advisory Topic

Posted by Tim Bain <tb...@alumni.duke.edu>.
Are you by any chance using a different version of the ActiveMQ client
library than the version the broker is running?

Maybe share your code that creates the consumer, and maybe someone can spot
something?

Tim

On Dec 4, 2017 7:24 AM, "MarcelHillmann" <ma...@allianz.de>
wrote:

> Hi,
>
> I try to subscribe the connection advisory topic, and I seen an
> ClassCastException.
>
> Is this a known issue?
> How can I solve it?
>
> Thanks
> Marcel
>
> java.io.IOException: org.apache.activemq.command.BrokerId cannot be cast
> to
> org.apache.activemq.command.ConsumerId
>         at
> org.apache.activemq.util.IOExceptionSupport.create(
> IOExceptionSupport.java:40)
>         at
> org.apache.activemq.transport.nio.NIOTransport.serviceRead(
> NIOTransport.java:168)
>         at
> org.apache.activemq.transport.nio.NIOTransport$1.onSelect(
> NIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.
> onSelect(SelectorSelection.java:98)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(
> SelectorWorker.java:118)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassCastException:
> org.apache.activemq.command.BrokerId cannot be cast to
> org.apache.activemq.command.ConsumerId
>         at
> org.apache.activemq.openwire.v12.MessageMarshaller.tightUnmarshal(
> MessageMarshaller.java:75)
>         at
> org.apache.activemq.openwire.v12.ActiveMQMessageMarshaller.tightUnmarshal(
> ActiveMQMessageMarshaller.java:66)
>         at
> org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(
> OpenWireFormat.java:456)
>         at
> org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.
> tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:125)
>         at
> org.apache.activemq.openwire.v12.MessageDispatchMarshaller.tightUnmarshal(
> MessageDispatchMarshaller.java:71)
>         at
> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(
> OpenWireFormat.java:365)
>         at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(
> OpenWireFormat.java:278)
>         at
> org.apache.activemq.transport.nio.NIOTransport.serviceRead(
> NIOTransport.java:154)
>         ... 6 more
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>