We're updating the issue view to help you get more done. 

LazyInitializationException with hibernate.enable_lazy_load_no_trans

Description

Hi,
We have setup hibernate.enable_lazy_load_no_trans to true in persistence.xml and we have LazyInitializationException thrown when we access a lazy @ManyToOne relation.
When the code runs AbstractLazyInitializer.initialize() the allowLoadOutsideTransaction property is set to false and initialized too.
Could you give me some hints to try to identify what's happend?
Thanks.
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:146) ~[hibernate-core-5.2.10.Final.jar:5.2.10.Final]
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:259) ~[hibernate-core-5.2.10.Final.jar:5.2.10.Final]
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:73) ~[hibernate-core-5.2.10.Final.jar:5.2.10.Final]
at com.xxxxx.dal.commun.model.Formule_$$jvst16c_5f.getProgrammeId(Formule$$_jvst16c_5f.java) ~[classes/:na]

Environment

Java 8 / tomcat 8.5.24 /spring 4.3.1

Status

Assignee

Yoann Rodière

Reporter

jean-pierre jean-pierre

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Worked in

5.2.10

Components

Affects versions

5.2.10

Priority

Major