altoo-ag/akka-kryo-serialization

Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969

anant1525 opened this issue · 2 comments

Hi romix,

I am tying to serialise the sample transaction class, but getting the below errors, could you suggest.

sample class:

public static class TransformationJob implements Serializable {
private final String text;

public TransformationJob(String text) {
  this.text = text;
}
public String getText() {
  return text;
}

}

application.conf:
`akka {
actor {
provider = "cluster"
extensions = ["com.romix.akka.serialization.kryo.KryoSerializationExtension$"]
serializers {
kryo = "com.romix.akka.serialization.kryo.KryoSerializer"
}

  serialization-bindings {
  // classes to be serialized
  "sample.cluster.transformation.TransformationMessages$TransformationJob" = kryo
} 

}`

maven:
<!-- https://mvnrepository.com/artifact/com.github.romix.akka/akka-kryo-serialization --> <dependency> <groupId>com.github.romix.akka</groupId> <artifactId>akka-kryo-serialization_2.12</artifactId> <version>0.5.1</version> </dependency>
Error:

[WARN] [04/15/2018 22:37:33.564] [ClusterSystem-akka.remote.default-remote-dispatcher-5] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:35.545] [ClusterSystem-akka.remote.default-remote-dispatcher-5] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:37.550] [ClusterSystem-akka.remote.default-remote-dispatcher-5] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:39.536] [ClusterSystem-akka.remote.default-remote-dispatcher-7] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:41.545] [ClusterSystem-akka.remote.default-remote-dispatcher-5] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:43.546] [ClusterSystem-akka.remote.default-remote-dispatcher-7] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
[WARN] [04/15/2018 22:37:45.547] [ClusterSystem-akka.remote.default-remote-dispatcher-7] [Deserializer(akka://ClusterSystem)] Failed to deserialize message with serializer id [123454323] and manifest []. Encountered unregistered class ID: 302425969
^C[INFO] [04/15/2018 22:37:47.064] [Thread-6] [CoordinatedShutdown(akka://ClusterSystem)] Starting coordinated shutdown from JVM shutdown hook
[INFO] [04/15/2018 22:37:47.081] [ClusterSystem-akka.actor.default-dispatcher-10] [akka.cluster.Cluster(akka://ClusterSystem)] Cluster Node [akka://ClusterSystem@127.0.0.1:2552] - Marked address [akka://ClusterSystem@127.0.0.1:2552] as [Leaving]
[WARN] [04/15/2018 22:37:51.849] [ClusterSystem-akka.actor.default-dispatcher-11] [akka://ClusterSystem@127.0.0.1:2552/system/cluster/core/daemon] Cluster Node [akka://ClusterSystem@127.0.0.1:2552] - Marking node(s) as UNREACHABLE [Member(address = akka://ClusterSystem@127.0.0.1:2551, status = Up)]. Node roles [backend]

you need to set theidstrategy to default - with your config you use idstrategy = "incremental" which does not work in a cluster
see src/main/resources/reference.conf for more details...

we are planning to adapt the default settings see #158

closing this issue - please re-open if the issue still persists