akka-persistence-mongo
akka-persistence-mongo copied to clipboard
3.0.5: NoClassDefFoundError for mongo dependency
If I switch to 3.0.5 I get a java.lang.NoClassDefFoundError: com/mongodb/internal/async/client/AsyncMongoClients
. I assume that is due to the change to a legacy mongodb dependency in the build script.
Hi @nleso,
I'm not seeing that in the test suite, where I would expect to see it. Is it possible that the 4.1.1
scala driver is not in the classpath for some reason? I briefly looked at one of the maven poms and it looked sane.
I'm not sure how exactly this is caused - I'm only using an Akka framework in my Java application. The app uses MongoDB as the Akka Persistence storage and therefore this library as the driver. When I upgraded the dependency to 3.0.5 I got the described runtime error, without any other changes in my depedencies. If I change the version to 3.0.4 or lower the error no longer occurs. When looking into the sole commit of 3.0.5 (https://github.com/scullxbones/akka-persistence-mongo/commit/7fcd25daae5055d3a7e6b1771908d502b0d024fe) I noticed that the MongoDB dependency has been changed from mongodb-driver
to mongodb-driver-legacy
. So I assumed that this causes the dependency error.