These are chat archives for atomix/atomix

2nd
Aug 2016
Raghav Babu Subramanian
@RaghavBabu
Aug 02 2016 01:30
Hi. I have a doubt. I am getting an exception while using Copycat. I am getting an ExecutionException while i do CompletableFuture.get()...
Exception stack flow is.. java.lang.RuntimeException: java.util.concurrent.ExecutionException: io.atomix.catalyst.serializer.SerializationException: failed to instantiate reference: must provide a single argument constructor
Am I missing something.. while submitting a task to CopycatClient!!
Kevin Daly
@kedaly
Aug 02 2016 13:00
@kuujo Thanks.
Jordan Halterman
@kuujo
Aug 02 2016 16:59
@kedaly we're actually adding those methods now. They've been added to map/set already. The rest will be added this week and then a new release will be pushed
Jordan Halterman
@kuujo
Aug 02 2016 17:08
@RaghavBabu that exception is thrown when a type that implements ReferenceCounted is being deserialized but it doesn't have a constructor that accepts ReferenceManager. Do you have a class that implements ReferenceCounted? That interface is used by the serializer to do object pooling internally. It's not recommended for short lived objects. It's not implemented by any Command or Query objects in Atomix. But it is implemented by Commit in the Copycat server. May sure you're not returning a Commit or something that implements ReferenceCounted from the state machine.
You may also want to enable whitelisting in the Serializer to prevent it from serializing any type that's not explicitly registered.
Or set a breakpoint on SerializationException and you should be able to see what type is being deserialized
Returning a Commit from the state machine should fail serialization, but it could be a bug. I'm interested in finding out the class that's being deserialized