hanishi opened a new issue, #134:
URL: https://github.com/apache/pekko-samples/issues/134

   When sending messages to shard entities in a Pekko cluster, we encountered a 
subtle issue with Jackson CBOR serialization. A case class containing an 
Option[Long] field was deserialized incorrectly: if the numeric value was small 
enough, it was represented as a java.lang.Integer rather than a java.lang.Long. 
This led to a ClassCastException during unboxing (via BoxesRunTime.unboxToLong) 
on the receiving shard. Annotating the Option[Long] field with 
@JsonDeserialize(contentAs = classOf[java.lang.Long]) fixed the issue by 
forcing Jackson to treat the value as a Long. This report aims to help others 
avoid the same pitfall in distributed Pekko setups.


-- 
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: notifications-unsubscr...@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to