18
Bagaimana cara memperbaiki org.hibernate.LazyInitializationException - tidak dapat menginisialisasi proxy - tanpa Sesi
Saya mendapatkan pengecualian berikut: Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) at sei.persistence.wf.entities.Element_$$_jvstc68_47.getNote(Element_$$_jvstc68_47.java) at JSON_to_XML.createBpmnRepresantation(JSON_to_XML.java:139) at JSON_to_XML.main(JSON_to_XML.java:84) ketika saya mencoba menelepon dari saluran utama berikut: Model subProcessModel = getModelByModelGroup(1112); System.out.println(subProcessModel.getElement().getNote()); Saya menerapkan getModelByModelGroup(int modelgroupid)metode pertama seperti ini: public static …