[ 
https://issues.apache.org/jira/browse/ARTEMIS-2608?focusedWorklogId=399745&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-399745
 ]

ASF GitHub Bot logged work on ARTEMIS-2608:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Mar/20 21:09
            Start Date: 07/Mar/20 21:09
    Worklog Time Spent: 10m 
      Work Description: michaelandrepearce commented on pull request #2954: 
ARTEMIS-2608 Fix ClassCastException on binary properties retrieval
URL: https://github.com/apache/activemq-artemis/pull/2954#discussion_r389312347
 
 

 ##########
 File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
 ##########
 @@ -610,7 +613,7 @@ private static ActiveMQMessage 
toAMQMessage(MessageReference reference,
          amqMsg.setCorrelationId(corrId.toString());
       }
 
-      final byte[] dsBytes = (byte[]) 
coreMessage.getObjectProperty(AMQ_MSG_DATASTRUCTURE);
+      final byte[] dsBytes = getBytesPropertyOrNull(coreMessage, 
AMQ_MSG_DATASTRUCTURE);
 
 Review comment:
   > Hi @jbertram @clebertsuconic , what about merging this?
   
   reading others reviews, isn't this waiting of finding the underlying cause 
why the properties go missing in AMQP? we should be fixing underlying issue, 
not plastering over.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 399745)
    Time Spent: 2h  (was: 1h 50m)

> ClassCastException when consuming a message using OpenWire
> ----------------------------------------------------------
>
>                 Key: ARTEMIS-2608
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2608
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: OpenWire
>    Affects Versions: 2.11.0
>            Reporter: Federico Valeri
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> This issue seems to be related to the conversion of the "HDR" binary 
> properties.
>  Quick workaround: clear message properties in the AMQP producer.
> Reproducer:
>  1. Send a message to the broker using OpenWire client
>  2. Consume that message using AMQP client
>  3. Send that message back to the broker using AMQP client
> Result: message could not be consumed by the OpenWire consumer.
> {code:java}
> 2020-01-23 12:52:44,095 WARN [org.apache.activemq.artemis.core.server] Error 
> during message dispatch: java.lang.ClassCastException: 
> org.apache.activemq.artemis.api.core.SimpleString cannot be cast to [B
>  at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.toAMQMessage(OpenWireMessageConverter.java:629)
>  [artemis-openwire-protocol-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.createMessageDispatch(OpenWireMessageConverter.java:501)
>  [artemis-openwire-protocol-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer.handleDeliver(AMQConsumer.java:258)
>  [artemis-openwire-protocol-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.sendMessage(AMQSession.java:312)
>  [artemis-openwire-protocol-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1161)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:504)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:3510)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2856)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.access$2300(QueueImpl.java:122)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:3848)
>  [artemis-server-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>  [artemis-commons-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>  [artemis-commons-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
>  [artemis-commons-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  [rt.jar:1.8.0_232]
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [rt.jar:1.8.0_232]
>  at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  [artemis-commons-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to