I'm new with play framework. I have a project but it is causing me problems.
I use Play Framework 2.5.9 along with ebean 3.0.2. The error is as follows:
play.sbt.PlayExceptions$CompilationException: Compilation error[value where is not a member of com.avaje.ebean.Finder[Long,models.Viaje]]
at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
at scala.Option.map(Option.scala:145)
at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:49)
at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44)
at scala.Option.map(Option.scala:145)
at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:44)
at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:40)
at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
Also the errors that are generated are related to the model classes. In each of these classes I have defined the following method:
public static Finder<Long, Motorista> find = new Finder<Long,Motorista>(Motorista.class);
And I make any query following the following nomenclature:
Motorista.find.findList ();
or:
Motorista.find.where (). eq ( "id", 1);
The issue is that the above error is always followed by errors in all the lines where I make those queries the error says:
value findList is not a member of com.avaje.ebean.Finder [Long, models.Motorista]
and
value where is not a member of com.avaje.ebean.Finder [Long, models.Motorista]
I think that maybe it is a configuration problem, although the project was working well for me.
My build.sbt file contains the following
name := """siiaf"""
version := "1.0-SNAPSHOT"
lazy val myProject = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs
)
libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.36"
And my plugins.sbt file contains the following:
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.9")
// 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")
Pleease need help