I have done many searches and tried everything I have found nothing works, how do you get this ebean to work? Yes I am new to this play framework. I am using intelliJ 2017.2.3, Play Framework 2.5
Was just trying a simple example:
package models;
import com.sun.javafx.beans.IDProperty;
import play.db.ebean.Model;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Account extends Model {
@ID
public String id;
public String dstr;
public String rt;
public String ctrl;
public String folioz;
}
errors:
Error:(3, 21) java: package play.db.ebean does not exist
Error:(4, 25) java: package javax.persistence does not exist
Error:(5, 25) java: package javax.persistence does not exist
Error:(8, 30) java: cannot find symbol
symbol: class Model
Error:(7, 2) java: cannot find symbol
symbol: class Entity
Error:(9, 6) java: cannot find symbol
symbol: class ID
location: class models.Account
application.conf:
db {
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
# https://www.playframework.com/documentation/latest/Developing-with-the-H2-Database
default.driver = org.h2.Driver
default.url = "jdbc:h2:mem:play"
default.username = sa
default.password = ""
# You can turn on SQL logging for any datasource
# https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements
#default.logSql=true
}
ebean.default = ["models.*"]
build.sbt:
lazy val root = (project in file(".")).enablePlugins(PlayJava,PlayEbean)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaCore,
javaJdbc,
cache,
javaWs,
evolutions
)
fork in run := true
plugins.sbt:
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
// Web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.6")
// Play enhancer - this automatically generates getters/setters for public fields
// and rewrites accessors of these fields to use the getters/setters. Remove this
// plugin if you prefer not to have this feature, or disable on a per project
// basis using disablePlugins(PlayEnhancer) in your build.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
// Play Ebean support, to enable, uncomment this line, and enable in your build.sbt using
// enablePlugins(PlayEbean).
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.2")
//("org.avaje.ebeanorm" % "avaje-ebeanorm" % "7.11.4")