Ich versuche, Play Authenticate zu integrieren, während JPA immer noch irgendwo in der App verwendet wird.Verwenden von Ebean und JPA im selben Play Framework-Projekt
Ich habe:
ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
at play.db.jpa.DefaultJPAApi$JPAApiProvider.<init>(DefaultJPAApi.java:39)
at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:34)
while locating play.db.jpa.DefaultJPAApi$JPAApiProvider
while locating play.db.jpa.JPAApi
for parameter 2 at controllers.Persons.<init>(Persons.java:33)
while locating controllers.Persons
for parameter 5 at router.Routes.<init>(Routes.scala:48)
while locating router.Routes
while locating play.api.inject.RoutesProvider
while locating play.api.routing.Router
for parameter 0 at play.api.http.JavaCompatibleHttpRequestHandler.<init>(HttpRequestHandler.scala:200)
while locating play.api.http.JavaCompatibleHttpRequestHandler
while locating play.api.http.HttpRequestHandler
for parameter 4 at play.api.DefaultApplication.<init>(Application.scala:221)
at play.api.DefaultApplication.class(Application.scala:221)
while locating play.api.DefaultApplication
while locating play.api.Application
1 error
, bevor Sie diese Zeile hinzufügen build.sbt und plugins.sbt:
excludeDependencies += "javax.persistence" % "persistence-api"
aber ich brauche das für meine Modelle als
[NullPointerException: null]
wird ausgelöst durch @Entity-Annotationen.
Ich habe gerade mit Java mit diesem Play Framework begonnen, also könnte es Dinge geben, die ich verpasse. Bitte weisen Sie sie bei Bedarf darauf hin.
Sie haben eine Version der JPA API jar im Klassenpfad (JPA 1?) Und Sie benötigen JPA API v2 +. So erlegen Play oder EBean einige Abhängigkeiten von Ihnen auf, und welchen JPA-Provider können Sie verwenden –