1
votes

So I followed this official tutorial in order to integrate Ebean with my project:
http://www.playframework.org/documentation/2.0/JavaEbean

I tried to use byId method of Finder (to retrieve an object from the db)
but got this error:

[RuntimeException: No JPA EntityManagerFactory configured for name [default]]

What should I do?

1

1 Answers

4
votes

I cant say what did you miss (some lines commented in application.conf ?) but to get it to work: browse play samples folder play/samples/java/computer-database/ it uses Ebean so you can see what went wrong and make additional modifications to your own code.

Edit:

Going through some of the basic JPA and Ebean related error messages, I suspect that you have first tried to configure your project to use JPA but then switched to use Ebean instead. That's why you have now overlapping Ebean and JPA configurations in your project which are causing the problem.

Try this tutorial to learn to use Ebean: http://www.playframework.org/documentation/2.0/JavaTodoList