-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for JPAApi, problem with JPAApi.em() #4862
Comments
@johdah I'm having the same issue. Did you ever figure out a solution? |
@Kdoherty11 I solved that problem by loading the DAO this way: UserDAO userDAO = play.Play.application().injector().instanceOf(UserDAO.class); But now I get this error everywhere. I have no idea what has changed since 2.3.x that causes this and it's hard to find somebody that does. I have this question for that, does it work for you with my code above? https://groups.google.com/forum/#!topic/play-framework/i4flTpToCug
|
@Kdoherty11 If you get that error also it's caused by the fact that no connections are closed so HikariCP is filling upp the connection pool that is 10 by default. The leak detection is triggered on every connection. |
@johdah and @Kdoherty11 I'm closing this issue in favor of #4890. Thanks. |
I think we need documentation for how to use JPAApi. I think I have almost solved it now, my implementation looks like this:
UserDAO
AbstractDAO
I get a Null Pointer Exception on em.getCriteriaBuilder so I guess it wasn't correct to pass the name of the persistence unit to jpaApi.em() so what should be given as the parameter there?
The text was updated successfully, but these errors were encountered: