-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Naveen Kumar opened SPR-16016 and commented
We're in the process migrating a large spring application to spring-boot and data-jpa. Almost all of the dao's use SessionFactory resource and Hibernate 4's Criteria classes.
Since it's not possible to instantly convert all those dao methods, so we decided to create a SessionFactory bean based on this reference documentation and gradually do jpa migration process.
But we end up with BeanCurrentlyInCreationException (attached the logs). Reproduced the same issue with a sample project and referred the gitlab url for that project. Until now, i have not yet come up with a workaround, so our migration process is blocked on this.
Glad to know if there is any workaround or any other ways to create SessionFactory bean.
Note: Existing application uses thread based session for transaction commits and rollbacks, so it's not feasible to use entityManager.unwrap(Session.class) as it's not thread based at all.
Affects: 4.3.11, 5.0 RC4, 5.0 GA
Reference URL: https://gitlab.com/krnaveen14/spring-orm-sessionfactorybean-bug
Attachments:
- direct_sf_unwrap_error.log (2.30 kB)
- error.log (2.31 kB)
Referenced from: commits 66a6fda, bb41cce
Backported to: 4.3.12