[ https://issues.apache.org/jira/browse/ARTEMIS-2922?focusedWorklogId=669653&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669653 ]
ASF GitHub Bot logged work on ARTEMIS-2922: ------------------------------------------- Author: ASF GitHub Bot Created on: 25/Oct/21 16:51 Start Date: 25/Oct/21 16:51 Worklog Time Spent: 10m Work Description: jbertram opened a new pull request #3815: URL: https://github.com/apache/activemq-artemis/pull/3815 …CastException -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 669653) Remaining Estimate: 0h Time Spent: 10m > artemis-cli consumer on large message results in a ClassCastException > --------------------------------------------------------------------- > > Key: ARTEMIS-2922 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2922 > Project: ActiveMQ Artemis > Issue Type: Bug > Affects Versions: 2.15.0, 2.16.0 > Environment: OS: Ubuntu 20.04 lts > jre/jdk: openjdk version "11.0.8" 2020-07-14 > The broker has been created with > {quote}bin/artemis create --user admin --password admin --allow-anonymous > broker > {quote} > (no changes in the config) > The message is produced with > {quote}artemis producer --data large-test.xml.sav --destination queue://test > {quote} > > Reporter: Oliver Scholz > Assignee: Justin Bertram > Priority: Major > Labels: ClassCastException, LargeMessage, artemis, cli, consumer > Attachments: large-test.xml.sav > > Time Spent: 10m > Remaining Estimate: 0h > > When i try to consume a Large Message (stored in ../data/large-messages) > with the artemis-cli > {quote}{color:#000000}artemis consumer --message-count 1 --data > export-test.xml --destination queue://test{color} > {quote} > i get an ClassCastException output > {quote}{color:#000000}Connection brokerURL = tcp://localhost:61616{color} > {color:#000000}Consumer:: filter = null{color} > {color:#000000}Consumer ActiveMQQueue[test], thread=0 wait until 1 messages > are consumed{color} > {color:#000000}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){color} > {color:#000000} at > org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer.write(XMLMessageSerializer.java:74){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.messages.Consumer$SerialiserMessageListener.onMessage(Consumer.java:140){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.handle(ConsumerThread.java:73){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.consume(ConsumerThread.java:192){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.messages.ConsumerThread.run(ConsumerThread.java:67){color} > {color:#000000}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){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.tools.xml.XMLMessageExporter.printMessageBody(XMLMessageExporter.java:61){color} > {color:#000000} at > org.apache.activemq.artemis.cli.commands.tools.xml.XMLMessageExporter.printSingleMessageAsXML(XMLMessageExporter.java:53){color} > {color:#000000} at > org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer.write(XMLMessageSerializer.java:72){color} > {color:#000000} ... 4 more{color} > {color:#000000}Consumer ActiveMQQueue[test], thread=0 Consumed: 0 > messages{color} > {color:#000000}Consumer ActiveMQQueue[test], thread=0 Consumer thread > finished{color} > {quote} > Yet, the message was consumed from the queue! > Also a workaround/fix for exporting Large Messages would be great. -- This message was sent by Atlassian Jira (v8.3.4#803005)