reactivemongo 0.11.x & play 2.3.x - crash error

148 views
Skip to first unread message

Ugo Bourdon

unread,
Aug 18, 2015, 2:41:20 PM8/18/15
to ReactiveMongo - http://reactivemongo.org
I try to upgrade my reactive mongo driver version to 0.11.6 with an 2.3.8 play apps.

I succeed to compile my code, and my mongo repository unit test works fine.

But when i start the app & request some route that request mongo db, I have this fatal error that crashing my app :

Uncaught error from thread [play-akka.actor.default-dispatcher-17] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play]
java
.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.setHeader(Ljava/lang/String;Ljava/lang/Object;)V
    at com
.ning.http.client.providers.netty.NettyAsyncHttpProvider.construct(NettyAsyncHttpProvider.java:706)
    at com
.ning.http.client.providers.netty.NettyAsyncHttpProvider.buildRequest(NettyAsyncHttpProvider.java:657)
    at com
.ning.http.client.providers.netty.NettyConnectListener$Builder.build(NettyConnectListener.java:145)
    at com
.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1071)
    at com
.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:940)

Any idea of what happen ?

Thx for your response.

Cédric Chantepie

unread,
Aug 18, 2015, 4:30:50 PM8/18/15
to ReactiveMongo - http://reactivemongo.org
Play 2.3.8 is using Netty 3.9.3, ReactiveMongo 0.11.6 is using Netty 3.10.4 Final, so you should have a linkage error.
Either you upgrade Play, or you downgrade ReactiveMongo.

As for Play 2.3.x, the Play-ReactiveMongo is only tested with 2.3.9.

Ugo Bourdon

unread,
Aug 19, 2015, 4:47:25 AM8/19/15
to ReactiveMongo - http://reactivemongo.org
I upgrade my play version to 2.3.10 but I have the same issue.
Then I downgrade to play 2.3.9 and it was the same.
So reactive mongo 0.11.x don't work with play 2.3.x ?

Cédric Chantepie

unread,
Aug 19, 2015, 7:28:05 AM8/19/15
to ReactiveMongo - http://reactivemongo.org
Please check you don't have multiple versions of Netty. The play module is tested successfully with 2.3.9.

Ugo Bourdon

unread,
Aug 19, 2015, 8:59:06 AM8/19/15
to ReactiveMongo - http://reactivemongo.org
It's tested with running the play server ?
Because my unit test with reactive mongo works well.
Just when I run the play server, it crash when I perform request using mongo request.

Ugo Bourdon

unread,
Aug 19, 2015, 8:59:44 AM8/19/15
to ReactiveMongo - http://reactivemongo.org
Do you know how I do that ?

Ugo Bourdon

unread,
Aug 19, 2015, 9:18:22 AM8/19/15
to ReactiveMongo - http://reactivemongo.org
So I think I find a lib which use another hided version of netty.
But no I have the same issue but with another stask trace

[ERROR] [08/19/2015 15:14:37.146] [play-akka.actor.default-dispatcher-2] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java
.lang.NoClassDefFoundError: Could not initialize class application.authentication.binding.json.UserJsonFmt$

It can't load my JsonFormat class. Any Idea of that ?

Cédric Chantepie

unread,
Aug 19, 2015, 12:46:36 PM8/19/15
to ReactiveMongo - http://reactivemongo.org
Do you have filtered the dependency also using Netty? Is this dependency defining the JSON class?

Ugo Bourdon

unread,
Aug 19, 2015, 12:57:16 PM8/19/15
to ReactiveMongo - http://reactivemongo.org

Cédric Chantepie

unread,
Aug 19, 2015, 1:28:32 PM8/19/15
to ReactiveMongo - http://reactivemongo.org
Try to update your build.sbt as following.

libraryDependencies ~= { _ map {
 
case m => m.exclude("io.netty", "netty")
} }

libraryDependencies
+= "io.netty" % "netty" % "3.9.9.Final" // From Play 2.3.10 dependencies


Ugo Bourdon

unread,
Aug 20, 2015, 5:36:53 AM8/20/15
to ReactiveMongo - http://reactivemongo.org
Thx. It seems working well.
Reply all
Reply to author
Forward
0 new messages