Unable to add ReactiveMongo to Play-Framework

Ers

I'm having issues integrating ReactiveMongo on Play. My build.sbt

libraryDependencies ++= Seq( "org.reactivemongo" %% "play2-reactivemongo" % "0.9" ) 

When I try to start the server using the play command, I get the following error:

 [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.reactivemongo#play2-reactivemongo_2.9.2;0.9: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: sbt.ResolveException: unresolved dependency: org.reactivemongo#play2-eactivemongo_2.9.2;0.9: not found 

To think what is going wrong is clear; he is looking for the Scala library version 2.9.2. I have no idea why SBT is looking for 2.9, I have 2.10 installed. I tried several cars.

 $ scalac -version Scala compiler version 2.10.2 -- Copyright 2002-2013, LAMP/EPFL 

and

 $ play play! 2.1.3 (using Java 1.7.0_25 and Scala 2.10.0), http://www.playframework.org 

Does anyone know how to solve this problem?

+4
source share
3 answers

Are you sure you are not using the Play2.0 application? Even if 2.1.3 is specified on the playback command line, the application you are trying to run may be 2.0. Please check the project / plugins.sbt file for the string, e.g.

 addSbtPlugin("play" % "sbt-plugin" % "2.1.3") 

If an attempt is made to search for version 2.9.2 for repeat play, the game is played using version 2.9.2 scala (and therefore it looks like you are using version 2.0)

+4
source

Jet Mongo requires Scala 2.10, and you are trying to get it from 2.9. http://search.maven.org/#search%7Cga%7C1%7Creactivemongo

try (pay attention to % instead of %% ):

 "org.reactivemongo" % "play2-reactivemongo_2.10" % "0.9" 
+1
source
 With single % instead of %% , dependency is not found ...i have changed my 

scala, and now everything is working fine, below is my snapshot of build.sbt:

 scalaVersion := "2.10.4" libraryDependencies ++= Seq( "org.reactivemongo" % "play2-reactivemongo_2.10" % "0.10.2" ) 
+1
source

Source: https://habr.com/ru/post/1502815/


All Articles