playframework - Play 2.4 com.avaje.ebean.Model -


this first post please gentle. working through tutorials using play. on version 2.4, tutorials using earlier version. followed guide play website incorporating ebeansin 2.4.

my build.sbt      name := """please-work"""  version := "1.0-snapshot"  lazy val root = (project in file(".")).enableplugins(playjava, playebean)  scalaversion := "2.11.6"  librarydependencies ++= seq(   javajdbc,   cache,   javaws,   "org.avaje.ebeanorm" % "avaje-ebeanorm" % "6.8.1" )  // play provides 2 styles of routers, 1 expects actions injected, // other, legacy style, accesses actions statically.  routesgenerator := injectedroutesgenerator 

my application.conf

db.default.driver=org.h2.driver

 db.default.url="jdbc:h2:mem:play" # db.default.username=sa # db.default.password=""  ebean.default = ["models.*"] 

my plugin.sbt

// play ebean support, enable, uncomment line, , enable in build.sbt using // enableplugins(sbtebean). note, uncommenting line automatically bring in // play enhancer, regardless of whether line above commented out or not.  addsbtplugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0") 

this code uses library

package model;  import com.avaje.ebean.model; import javax.persistence.entity; import javax.persistence.id;  /**  * created craig.ledgerwood on 18/09/2015.  */ @entity public class person extends model {     @id     public string id;     public string name; } 

the irritating thing errors keep changing without me changing anything. com.avaje.ebean.model not available. getting

noclassdeffounderror: com/avaje/ebeaninternal/server/ddl/ddlgenerator 

please point me in right direction. hoping move on , use postgres db in future, want basics down before moving on , these little stumbling blocks getting frustrating im sure simple.

regards

craig

remove following dependency in build.sbt

"org.avaje.ebeanorm" % "avaje-ebeanorm" % "6.8.1" 

and in plugins.sbt, update sbt-play-ebean

addsbtplugin("com.typesafe.sbt" % "sbt-play-ebean" % "2.0.0") 

i have resolved same issue in play 2.4.6, please refer it


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -