org.hibernate.LazyInitializationException: could not initialize proxy - no Session

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Oracle Community by Eric ZHOU, 1 year ago
via gilead by vladbalan
, 1 year ago
could not initialize proxy - the owning Session was closed
via Tridion by Quirijn
, 6 months ago
could not initialize proxy - no Session
via Stack Overflow by jarvan
, 1 year ago
could not initialize proxy - no Session
via gilead by maku01
, 1 year ago
could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
at com.splwg.domain.database.field.Field$$EnhancerByCGLIB$$2ea140ac.equals()
at org.hibernate.util.EqualsHelper.equals(EqualsHelper.java:10)
at org.hibernate.type.AbstractType.isEqual(AbstractType.java:108)
at org.hibernate.type.ComponentType.isEqual(ComponentType.java:125)
at java.util.HashMap.eq(HashMap.java:299)
at java.util.HashMap.removeEntryForKey(HashMap.java:602)
at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:403)
at java.util.HashMap.put(HashMap.java:431)
at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:107)
at net.sf.ehcache.Cache.put(Cache.java:569)
at net.sf.ehcache.Cache.put(Cache.java:522)
at org.hibernate.cache.EhCache.put(EhCache.java:119)
at org.hibernate.cache.ReadOnlyCache.put(ReadOnlyCache.java:59)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:156)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
at org.hibernate.loader.Loader.doQuery(Loader.java:729)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:98)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66)
at com.splwg.domain.database.table.Table$$EnhancerByCGLIB$$45175954.getEntityId()
at com.splwg.base.domain.common.foreignKeyReference.ForeignKeyReference_Impl.getEntityId(ForeignKeyReference_Impl.java:113)
at com.splwg.domain.common.foreignKeyReference.ForeignKeyReference__.CGLIB$getEntityId$36()
at com.splwg.domain.common.foreignKeyReference.ForeignKeyReference__$$FastClassByCGLIB$$2da43d5d.invoke()
at com.splwg.base.support.interception.BusinessMethodInterceptor.intercept(BusinessMethodInterceptor.java:84)
at com.splwg.domain.common.foreignKeyReference.ForeignKeyReference__.getEntityId()
at com.splwg.base.support.changehandlers.characteristic.AbstractCharacteristicValueInstance.getFKEntityId(AbstractCharacteristicValueInstance.java:110)
at com.splwg.base.support.changehandlers.characteristic.SimpleCharacteristicValueValidation.verifyFKIsValid(SimpleCharacteristicValueValidation.java:218)
at com.splwg.base.support.changehandlers.characteristic.SimpleCharacteristicValueValidation.validateFKCharacteristic(SimpleCharacteristicValueValidation.java:119)
at com.splwg.base.support.changehandlers.characteristic.SimpleCharacteristicValueValidation.validateAddOrChange(SimpleCharacteristicValueValidation.java:84)
at com.splwg.base.support.changehandlers.characteristic.EntityCharacteristicValueValidation.validateAddOrChange(EntityCharacteristicValueValidation.java:125)
at com.splwg.base.support.changehandlers.characteristic.EntityCharacteristicValueValidation.validateAddOrChange(EntityCharacteristicValueValidation.java:117)
at com.splwg.base.api.changehandling.AbstractCustomRule.handleWhenConditionalsAreTrue(AbstractCustomRule.java:61)
at com.splwg.base.support.changehandlers.AbstractValidationRule.applyRule(AbstractValidationRule.java:92)
at com.splwg.base.support.changehandlers.ChangeEventHandler.applyRule(ChangeEventHandler.java:289)
at com.splwg.base.support.changehandlers.ChangeEventHandler.access$300(ChangeEventHandler.java:37)
at com.splwg.base.support.changehandlers.ChangeEventHandler$2.run(ChangeEventHandler.java:220)
at com.splwg.base.support.changehandlers.ChangeEventHandler$JumpToChangeHandlerRunner.run(ChangeEventHandler.java:334)
at com.splwg.base.support.interception.SessionInterceptionManager.notifyGenericCallStackJump(SessionInterceptionManager.java:264)
at com.splwg.base.support.context.FrameworkSession.notifyGenericCallStackJump(FrameworkSession.java:1361)
at com.splwg.base.support.changehandlers.ChangeEventHandler.executeValidation(ChangeEventHandler.java:224)
at com.splwg.base.support.changehandlers.SessionChangeManager.fireEagerValidations(SessionChangeManager.java:157)
at com.splwg.base.support.changehandlers.SessionChangeManager.fireEvents(SessionChangeManager.java:110)
at com.splwg.base.support.changehandlers.SessionChangeManager.setDTOCalled(SessionChangeManager.java:64)
at com.splwg.base.support.context.FrameworkSession.setDTOCalled(FrameworkSession.java:709)
at com.splwg.base.support.api.AbstractBusinessEntity.completeSetAbstractDTO(AbstractBusinessEntity.java:133)
at com.splwg.base.support.context.FrameworkSession.createBusinessEntity(FrameworkSession.java:952)
at com.splwg.base.support.impl.AbstractDataTransferObject$1.run(AbstractDataTransferObject.java:76)
at com.splwg.base.support.impl.AbstractDataTransferObject$JumpFromDTORunner.run(AbstractDataTransferObject.java:166)
at com.splwg.base.support.interception.SessionInterceptionManager.notifyGenericCallStackJump(SessionInterceptionManager.java:264)
at com.splwg.base.support.context.FrameworkSession.notifyGenericCallStackJump(FrameworkSession.java:1361)
at com.splwg.base.support.impl.AbstractDataTransferObject.abstractNewEntity(AbstractDataTransferObject.java:82)
at com.splwg.base.domain.todo.toDoEntry.ToDoEntryCharacteristic_DTO.newEntity(ToDoEntryCharacteristic_DTO.java:215)
at com.splwg.base.domain.todo.toDoEntry.ToDoEntryCharacteristics_Gen.add(ToDoEntryCharacteristics_Gen.java:57)
at com.splwg.base.domain.todo.toDoEntry.ToDoCreator_Impl.createCharacteristics(ToDoCreator_Impl.java:254)
at com.splwg.base.domain.todo.toDoEntry.ToDoCreator_Impl.create(ToDoCreator_Impl.java:159)
at com.splwg.base.domain.todo.toDoEntry.ToDoCreator_Impl__.CGLIB$create$0()
at com.splwg.base.domain.todo.toDoEntry.ToDoCreator_Impl__$$FastClassByCGLIB$$34cc8eda.invoke()
at com.splwg.base.support.interception.BusinessMethodInterceptor.intercept(BusinessMethodInterceptor.java:84)
at com.splwg.base.domain.todo.toDoEntry.ToDoCreator_Impl__.create()
at com.splwg.ccb.domain.todo.toDoEntry.ToDoEntryProcessor_Impl.add(ToDoEntryProcessor_Impl.java:166)
at com.splwg.ccb.domain.todo.toDoEntry.ToDoEntryProcessor_Impl.addToDo(ToDoEntryProcessor_Impl.java:61)
at com.splwg.ccb.domain.todo.toDoEntry.ToDoEntryProcessor_Impl__.CGLIB$addToDo$0()
at com.splwg.ccb.domain.todo.toDoEntry.ToDoEntryProcessor_Impl__$$FastClassByCGLIB$$e2ab76d1.invoke()
at com.splwg.base.support.interception.BusinessMethodInterceptor.intercept(BusinessMethodInterceptor.java:84)
at com.splwg.ccb.domain.todo.toDoEntry.ToDoEntryProcessor_Impl__.addToDo()
at com.splwg.cm.domain.payment.payment.CmlPayment_CHandler.createToDoEntryForAdjustment(CmlPayment_CHandler.java:250)
at com.splwg.cm.domain.payment.payment.CmlPayment_CHandler.prepareToAdd(CmlPayment_CHandler.java:150)
at com.splwg.base.support.changehandlers.HandlerPrepareMethodRunner$1.run(HandlerPrepareMethodRunner.java:44)
at com.splwg.base.support.changehandlers.HandlerPrepareMethodRunner$JumpToChangeHandlerRunner.run(HandlerPrepareMethodRunner.java:64)
at com.splwg.base.support.interception.SessionInterceptionManager.notifyGenericCallStackJump(SessionInterceptionManager.java:264)
at com.splwg.base.support.context.FrameworkSession.notifyGenericCallStackJump(FrameworkSession.java:1361)
at com.splwg.base.support.changehandlers.HandlerPrepareMethodRunner.fireForOneHandler(HandlerPrepareMethodRunner.java:53)
at com.splwg.base.support.cobol.JavaRowUserExitHandler.processPrechangeEvent(JavaRowUserExitHandler.java:280)
at com.splwg.base.support.cobol.JavaRowUserExitHandler.handleAboutToAdd(JavaRowUserExitHandler.java:274)
at com.splwg.base.support.cobol.JavaRowUserExitHandler.handleCHandler(JavaRowUserExitHandler.java:242)
at com.splwg.base.support.cobol.JavaRowUserExitHandler.privateHandle(JavaRowUserExitHandler.java:193)
at com.splwg.base.support.cobol.JavaRowUserExitHandler.handle(JavaRowUserExitHandler.java:68)
at sun.reflect.GeneratedMethodAccessor1723.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache$MethodDispatcher.dispatchToRequestedMethod(CobolToJavaGateway.java:337)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache$MethodDispatcher.access$300(CobolToJavaGateway.java:255)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache.dispatchToRequestedMethod(CobolToJavaGateway.java:250)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache.access$000(CobolToJavaGateway.java:232)
at com.splwg.base.support.cobol.CobolToJavaGateway.callJava(CobolToJavaGateway.java:65)
at com.splwg.base.support.cobol.host.command.CobolToJavaGatewayCommand.invoke(CobolToJavaGatewayCommand.java:33)
at com.splwg.base.support.cobol.host.SingleJvmRunner.invoke(SingleJvmRunner.java:22)
at com.splwg.base.support.cobol.host.CommandRunnerHolder.invoke(CommandRunnerHolder.java:31)
at com.splwg.base.support.cobol.host.CobolToJavaClient.privateCallJava(CobolToJavaClient.java:166)
at com.splwg.base.support.cobol.host.CobolToJavaClient.callJava(CobolToJavaClient.java:134)
at com.microfocus.cobol.RuntimeSystem.cobcall(Native Method)
at com.splwg.base.support.cobol.host.command.CallCobolCommand.invoke(CallCobolCommand.java:73)
at com.splwg.base.support.cobol.host.SingleJvmRunner.invoke(SingleJvmRunner.java:22)
at com.splwg.base.support.cobol.host.CommandRunnerHolder.invoke(CommandRunnerHolder.java:31)
at com.splwg.base.support.cobol.AbstractCobolProgram$CallCobolClosure.run(AbstractCobolProgram.java:195)
at com.splwg.base.support.interception.SessionInterceptionManager.notifyGenericCallStackJump(SessionInterceptionManager.java:264)
at com.splwg.base.support.context.FrameworkSession.notifyGenericCallStackJump(FrameworkSession.java:1361)
at com.splwg.base.support.cobol.AbstractCobolProgram$1.run(AbstractCobolProgram.java:115)
at com.splwg.base.support.batch.NewCobolThreadExecuter.run(NewCobolThreadExecuter.java:94)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
49 times, 6 months ago
Once, 2 months ago
2 times, 9 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.