Closed jonaskahn closed 1 month ago
Hi @jonaskahn
The transactional request middleware/filter creates an EntityManager per request, once request is done the EM is closed. The issue is on your @Singleton
repository, just remove that annotation and everything should work
Oh, I see. I read the document and I thought the mechanism like spring boot but it seem does not.
So I remove @Singleton
and now it worked. Thank you
Correct. We don't generate a proxy (or anything like that), that is why the scope is important
Yup. I see. I will close the issue
I'm building an template api with jooby using Kotlin. When I try to integrate with Hibernate . The error is thrown everytime I re-call (after the second times)
java.lang.IllegalStateException: Session/EntityManager is closed
Here is my configuration
App.kt
Controller
UserService
UserServiceImpl
UserRepository
UserRepositoryImpl
Create user request