When I run the Play JPA Example, downloaded either from GitHub or the Examples page, I get this error:
ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoClassDefFoundError: org/dom4j/io/STAXEventReader
at play.db.jpa.DefaultJPAApi$JPAApiProvider.<init>(DefaultJPAApi.java:44)
at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:39)
while locating play.db.jpa.DefaultJPAApi$JPAApiProvider
while locating play.db.jpa.JPAApi
for the 1st parameter of models.JPAPersonRepository.<init>(JPAPersonRepository.java:23)
while locating models.JPAPersonRepository
while locating models.PersonRepository
for the 2nd parameter of controllers.PersonController.<init>(PersonController.java:28)
while locating controllers.PersonController
for the 2nd parameter of router.Routes.<init>(Routes.scala:30)
while locating router.Routes
while locating play.api.inject.RoutesProvider
while locating play.api.routing.Router
for the 1st parameter of play.api.http.JavaCompatibleHttpRequestHandler.<init>(HttpRequestHandler.scala:222)
while locating play.api.http.JavaCompatibleHttpRequestHandler
while locating play.api.http.HttpRequestHandler
for the 6th parameter of play.api.DefaultApplication.<init>(Application.scala:236)
at play.api.DefaultApplication.class(Application.scala:235)
while locating play.api.DefaultApplication
while locating play.api.Application
This happens if I boot it with sbt run
or through IntelliJ.