Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.15.0, 2.16.0
-
None
Description
When i try to consume a Large Message (stored in ../data/large-messages) with the artemis-cli
artemis consumer --message-count 1 --data export-test.xml --destination queue://test
i get an ClassCastException output
Connection brokerURL = tcp://localhost:61616
Consumer:: filter = null
Consumer ActiveMQQueue[test], thread=0 wait until 1 messages are consumed
java.lang.RuntimeException: java.lang.ClassCastException: class org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl cannot be cast to class org.apache.activemq.artemis.core.server.LargeServerMessage (org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl and org.apache.activemq.artemis.core.server.LargeServerMessage are in unnamed module of loader java.net.URLClassLoader @18769467)
at org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer.write(XMLMessageSerializer.java:74)
at org.apache.activemq.artemis.cli.commands.messages.Consumer$SerialiserMessageListener.onMessage(Consumer.java:140)
at org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.handle(ConsumerThread.java:73)
at org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.consume(ConsumerThread.java:192)
at org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.run(ConsumerThread.java:67)
Caused by: java.lang.ClassCastException: class org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl cannot be cast to class org.apache.activemq.artemis.core.server.LargeServerMessage (org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl and org.apache.activemq.artemis.core.server.LargeServerMessage are in unnamed module of loader java.net.URLClassLoader @18769467)
at org.apache.activemq.artemis.cli.commands.tools.xml.XMLMessageExporter.printMessageBody(XMLMessageExporter.java:61)
at org.apache.activemq.artemis.cli.commands.tools.xml.XMLMessageExporter.printSingleMessageAsXML(XMLMessageExporter.java:53)
at org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer.write(XMLMessageSerializer.java:72)
... 4 more
Consumer ActiveMQQueue[test], thread=0 Consumed: 0 messages
Consumer ActiveMQQueue[test], thread=0 Consumer thread finished
Yet, the message was consumed from the queue!
Also a workaround/fix for exporting Large Messages would be great.
Attachments
Attachments
Issue Links
- links to