Is kryo 1.1.5 incompatible with salat 1.11.2 ?
NoctisHong opened this issue · 1 comments
NoctisHong commented
Since salat based on Casbah 3.1.1, with support for Mongo 3.x
And as I migrate akka-kryo from 0.5.2 to 1.1.5, my service starting up encounts with the error:
[error] Exception in thread "main" java.lang.ExceptionInInitializerError
[error] at ClusterService.Server.ServerExtension.$init$(ServerExtension.scala:139)
[error] at ClusterService.Server.Develop$.<init>(Develop.scala:11)
[error] at ClusterService.Server.Develop$.<clinit>(Develop.scala)
[error] at ClusterService.Server.Develop.main(Develop.scala)
[error] Caused by: java.lang.IllegalArgumentException: clusterListener can not be null
[error] at com.mongodb.assertions.Assertions.notNull(Assertions.java:37)
[error] at com.mongodb.connection.ClusterSettings$Builder.addClusterListener(ClusterSettings.java:280)
[error] at com.mongodb.connection.DefaultClusterFactory.getClusterSettings(DefaultClusterFactory.java:205)
[error] at com.mongodb.connection.DefaultClusterFactory.create(DefaultClusterFactory.java:87)
[error] at com.mongodb.Mongo.createCluster(Mongo.java:682)
[error] at com.mongodb.Mongo.createCluster(Mongo.java:668)
[error] at com.mongodb.Mongo.<init>(Mongo.java:281)
[error] at com.mongodb.MongoClient.<init>(MongoClient.java:187)
[error] at com.mongodb.casbah.MongoClient$.apply(MongoClient.scala:129)
[error] at Common.MongoFactoryBase.<init>(MongoFactory.scala:92)
[error] at Common.MongoFactory$.<init>(MongoFactory.scala:267)
[error] at Common.MongoFactory$.<clinit>(MongoFactory.scala)
This error mainly caused by Casbah can not initialize MongoClient, so does this issue cause by incompatibility version between kryo and mongodb ?
danischroeter commented
Hi @NoctisHong
You probably have issues with some dependencies that get updated when using the latest version of akka-kryo... most probably akka itself. The plugin has almost no dependencies see https://mvnrepository.com/artifact/io.altoo/akka-kryo-serialization_2.13/1.1.5
You can probably manually override the dependencies using excludeAll.