2015-11-23 2 views
0

Я пытаюсь перенести небольшой проект, который я начал играть! 2,2 до 2,5. Однако я столкнулся с проблемой с Ebeans и миграцией Ebeans в отдельный модуль.Миграция в игру 2.5

Так что я пытался начать чистый проект, и добавить EBeans согласно документации, но я до сих пор получаю следующее сообщение:

[info] Loading project definition from /Users/user/Documents/Java/xyz/project 
Play ebean module has been replaced with an external Play ebean plugin. 
See https://playframework.com/documentation/2.4.x/Migration24 for details. 

Мои build.sbt:

name := "y2kbooking" 

version := "1.0" 

lazy val `y2kbooking` = (project in file(".")).enablePlugins(PlayJava, PlayEbean) 

scalaVersion := "2.11.6" 

libraryDependencies ++= Seq(javaJdbc , javaEbean , cache , javaWs) 

unmanagedResourceDirectories in Test <+= baseDirectory (_ /"target/web/public/test") 

(обратите внимание, что Idea показывает PlayEbean красным цветом, так как он не знает модуля?)

Plugins.sbt:

logLevel := Level.Warn 

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" 

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0") 

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0") 

build.properties:

sbt.version=0.13.8 

application.conf:

db.default.driver=org.h2.Driver 
db.default.url="jdbc:h2:mem:play" 
db.default.user=sa 
db.default.password="defaultlogonpassword" 

ebean.default= ["models.*"] 

Есть ли что-то мне не хватает? Я создаю проецируемый с помощью IDEA и запускаю его с плагином IDEA Scale 1.5.4.

[EDIT:] я также пытался бодаться с SBT-игра-ebeanaddSbtPlugin перед м.о.ш.-плагин. Это, однако, дает следующее сообщение об ошибке:

Error:Error while importing SBT project: 
... 
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65) 
    at sbt.Using.apply(Using.scala:24) 
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65) 
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48) 
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32) 
    at sbt.MainLoop$.runLogged(MainLoop.scala:24) 
    at sbt.StandardMain$.runManaged(Main.scala:53) 
    at sbt.xMain.run(Main.scala:28) 
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) 
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:129) 
    at xsbt.boot.Launch$.run(Launch.scala:109) 
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36) 
    at xsbt.boot.Launch$.launch(Launch.scala:117) 
    at xsbt.boot.Launch$.apply(Launch.scala:19) 
    at xsbt.boot.Boot$.runImpl(Boot.scala:44) 
    at xsbt.boot.Boot$.main(Boot.scala:20) 
    at xsbt.boot.Boot.main(Boot.scala) 
[error] java.lang.ClassNotFoundException: $bc978b751097ebe513a6$ 
[error] Use 'last' for the full log. 
Invalid response. 

[EDIT 2:]

libraryDependencies ++= Seq(javaJdbc , javaEbean , cache , javaWs) 

Я думаю, что я пропустил тот факт, что «javaEbean» был еще в libraryDependencies, и это может быть причиной. Однако удаление не дает предупреждение миграции, но подобное исключение, как и в редактировании выше приблизительно ClassNotFound:

java.lang.ClassNotFoundException: $0b93c53b7f37eaeb2c7f$ 
    at scala.tools.nsc.interpreter.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:83) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:344) 
    at sbt.compiler.Eval$.getModule(Eval.scala:471) 
    at sbt.compiler.Eval$.getValue(Eval.scala:462) 
    at sbt.compiler.Eval$$anonfun$4.apply(Eval.scala:97) 
    at sbt.compiler.Eval$$anonfun$4.apply(Eval.scala:97) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateDslEntry$1.apply(EvaluateConfigurations.scala:185) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateDslEntry$1.apply(EvaluateConfigurations.scala:183) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateSbtFile$1$$anonfun$11.apply(EvaluateConfigurations.scala:128) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateSbtFile$1$$anonfun$11.apply(EvaluateConfigurations.scala:128) 
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) 
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) 
    at scala.collection.immutable.List.foreach(List.scala:318) 
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) 
    at scala.collection.AbstractTraversable.map(Traversable.scala:105) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateSbtFile$1.apply(EvaluateConfigurations.scala:128) 
    at sbt.EvaluateConfigurations$$anonfun$evaluateSbtFile$1.apply(EvaluateConfigurations.scala:122) 
    at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712) 
    at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717) 
    at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:716) 
    at scala.collection.MapLike$class.getOrElse(MapLike.scala:128) 
    at scala.collection.AbstractMap.getOrElse(Map.scala:58) 
    at sbt.Load$.sbt$Load$$memoLoadSettingsFile$1(Load.scala:716) 
    at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723) 
    at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723) 
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) 
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) 
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) 
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) 
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) 
    at scala.collection.AbstractTraversable.map(Traversable.scala:105) 
    at sbt.Load$.loadFiles$1(Load.scala:723) 
    at sbt.Load$.discoverProjects(Load.scala:734) 
    at sbt.Load$.discover$1(Load.scala:545) 
    at sbt.Load$.loadTransitive(Load.scala:574) 
    at sbt.Load$.loadProjects$1(Load.scala:442) 
    at sbt.Load$.loadUnit(Load.scala:446) 
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281) 
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281) 
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91) 
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90) 
    at sbt.BuildLoader.apply(BuildLoader.scala:140) 
    at sbt.Load$.loadAll(Load.scala:334) 
    at sbt.Load$.loadURI(Load.scala:289) 
    at sbt.Load$.load(Load.scala:285) 
    at sbt.Load$.load(Load.scala:276) 
    at sbt.Load$.apply(Load.scala:130) 
    at sbt.Load$.buildPluginDefinition(Load.scala:821) 
    at sbt.Load$.buildPlugins(Load.scala:787) 
    at sbt.Load$.plugins(Load.scala:775) 
    at sbt.Load$.loadUnit(Load.scala:431) 
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281) 
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281) 
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91) 
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90) 
    at sbt.BuildLoader.apply(BuildLoader.scala:140) 
    at sbt.Load$.loadAll(Load.scala:334) 
    at sbt.Load$.loadURI(Load.scala:289) 
    at sbt.Load$.load(Load.scala:285) 
    at sbt.Load$.load(Load.scala:276) 
    at sbt.Load$.apply(Load.scala:130) 
    at sbt.Load$.defaultLoad(Load.scala:36) 
    at sbt.BuiltinCommands$.doLoadProject(Main.scala:481) 
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475) 
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475) 
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58) 
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58) 
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60) 
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60) 
    at sbt.Command$.process(Command.scala:92) 
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98) 
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98) 
    at sbt.State$$anon$1.process(State.scala:184) 
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98) 
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98) 
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) 
    at sbt.MainLoop$.next(MainLoop.scala:98) 
    at sbt.MainLoop$.run(MainLoop.scala:91) 
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70) 
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65) 
    at sbt.Using.apply(Using.scala:24) 
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65) 
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48) 
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32) 
    at sbt.MainLoop$.runLogged(MainLoop.scala:24) 
    at sbt.StandardMain$.runManaged(Main.scala:53) 
    at sbt.xMain.run(Main.scala:28) 
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) 
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:129) 
    at xsbt.boot.Launch$.run(Launch.scala:109) 
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36) 
    at xsbt.boot.Launch$.launch(Launch.scala:117) 
    at xsbt.boot.Launch$.apply(Launch.scala:19) 
    at xsbt.boot.Boot$.runImpl(Boot.scala:44) 
    at xsbt.boot.Boot$.main(Boot.scala:20) 
    at xsbt.boot.Boot.main(Boot.scala) 
[error] java.lang.ClassNotFoundException: $0b93c53b7f37eaeb2c7f$ 

ответ

1

Вы должны удалить его из зависимостей. Измените зависимости этой библиотеки:

libraryDependencies ++= Seq(javaJdbc , cache , javaWs)