[0.12.1] Using reactivemongo & play2-reactivemongo with play 2.4

84 views
Skip to first unread message

Ugo Bourdon

unread,
Mar 31, 2017, 4:29:55 AM3/31/17
to ReactiveMongo - http://reactivemongo.org
Hi,

I migrate my reactivemongo driver from 0.11.4 to 0.12.1 (and do same thing for play2-reactivemongo module).
When i try to launch run commande to start my play server I this error message :

java.lang.NoSuchMethodError: com.typesafe.config.ConfigFactory.defaultApplication(Lcom/typesafe/config/ConfigParseOptions;)Lcom/typesafe/config/Config;
    at play
.api.Configuration$$anonfun$3.apply(Configuration.scala:75)
    at play
.api.Configuration$$anonfun$3.apply(Configuration.scala:71)
    at scala
.Option.getOrElse(Option.scala:121)
    at play
.api.Configuration$.load(Configuration.scala:71)
    at play
.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerStart.scala:203)
    at play
.core.server.DevServerStart$$anonfun$mainDev$1.apply(DevServerStart.scala:61)
    at play
.utils.Threads$.withContextClassLoader(Threads.scala:21)
    at play
.core.server.DevServerStart$.mainDev(DevServerStart.scala:60)
    at play
.core.server.DevServerStart$.mainDevHttpMode(DevServerStart.scala:50)
    at play
.core.server.DevServerStart.mainDevHttpMode(DevServerStart.scala)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:497)
    at play
.runsupport.Reloader$.startDevMode(Reloader.scala:223)
    at play
.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.devModeServer$lzycompute$1(PlayRun.scala:74)
    at play
.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.play$sbt$run$PlayRun$$anonfun$$anonfun$$anonfun$$devModeServer$1(PlayRun.scala:74)
    at play
.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:100)
    at play
.sbt.run.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$2$$anonfun$apply$3.apply(PlayRun.scala:53)
    at scala
.Function1$$anonfun$compose$1.apply(Function1.scala:47)

Have you any idea of what happened ?

Thx for your response.


Ugo Bourdon

unread,
Mar 31, 2017, 4:50:45 AM3/31/17
to ReactiveMongo - http://reactivemongo.org
I find in play-reactivemongo doc that i must just add play2-reactivemongo dependency to retrieve reactivemongo driver & doing that seems to solve my issue.

BUT

When I only add this line in my Build.scala file
"org.reactivemongo" %% "play2-reactivemongo" % "0.12.1-play24",

I can launch my play2 server and have this error message instead :

2017-03-31 10:45:03,510 ERROR p.c.s.n.PlayDefaultUpstreamHandler  - Exception caught in Netty
java
.lang.NoSuchMethodError: play.api.libs.iteratee.Execution$Implicits$.trampoline()Lscala/concurrent/ExecutionContext;
    at play
.core.server.netty.PlayDefaultUpstreamHandler.play$core$server$netty$PlayDefaultUpstreamHandler$$handleAction$1(PlayDefaultUpstreamHandler.scala:259) ~[play-netty-server_2.11-2.4.6.jar:2.4.6]
    at play
.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:155) ~[play-netty-server_2.11-2.4.6.jar:2.4.6]
    at org
.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty.jar:na]
    at com
.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) [netty-http-pipelining.jar:na]
    at org
.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty.jar:na]
    at org
.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:108) [netty.jar:na]
    at org
.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty.jar:na]
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) [netty.jar:na]
    at org
.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459) [netty.jar:na]
    at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536) [netty.jar:na]
    at org
.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty.jar:na]
    at org
.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty.jar:na]
    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty.jar:na]
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty.jar:na]
    at org
.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty.jar:na]
    at org
.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty.jar:na]
    at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [netty.jar:na]
    at org
.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [netty.jar:na]
    at org
.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [netty.jar:na]
    at org
.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty.jar:na]
    at org
.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty.jar:na]
    at org
.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty.jar:na]
    at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
    at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
    at java
.lang.Thread.run(Thread.java:745) [na:1.8.0_45]Saisissez le code ici...

Ugo Bourdon

unread,
Mar 31, 2017, 5:23:08 AM3/31/17
to ReactiveMongo - http://reactivemongo.org
It seems to be an version collision issue with Akka. Have you a workaround about that ?

    at org
.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty.</sp

Ugo Bourdon

unread,
Mar 31, 2017, 5:27:26 AM3/31/17
to ReactiveMongo - http://reactivemongo.org
And i make mistake in my description I upgrade my reactivemongo version from 0.11.14 to 0.12.1

Cédric Chantepie

unread,
Mar 31, 2017, 12:10:52 PM3/31/17
to ReactiveMongo - http://reactivemongo.org
I'd suggest to check the iteratees dependencies.

Ugo Bourdon

unread,
Mar 31, 2017, 5:49:01 PM3/31/17
to reacti...@googlegroups.com
How an upgrade of my mongo driver can be create a fail in the iteratee of my playframework ? Mostly i use the play24 module.

Le 31 mars 2017 18:10, "Cédric Chantepie" <chantep...@gmail.com> a écrit :
I'd suggest to check the iteratees dependencies.

--
You received this message because you are subscribed to a topic in the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reactivemongo/2Ti0fV0Dkn0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reactivemongo+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cédric Chantepie

unread,
Apr 1, 2017, 5:35:57 AM4/1/17
to ReactiveMongo - http://reactivemongo.org
If there is a direct dependency against the driver (not a transitive one using the plugin dependency for Play), the driver will pull an Iteratees fresher than Play (support from Iteratees 2.3 to 2.6).

If using only plugin dependency, have to check whether the dependency exclusion applied by the plugin (appropriate for Play) is ok.

Nicolas Deverge

unread,
Apr 1, 2017, 8:31:18 AM4/1/17
to ReactiveMongo - http://reactivemongo.org
I had the exact same issue. 
After trying many things, I upgraded my app to Play 2.5 and the issue disappeared (not really sure if this is what fixed the issue though).
Reply all
Reply to author
Forward
0 new messages