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

Solutions on the web

via Spring JIRA by Siarhei Sakovich, 1 year ago
failed to lazily initialize a collection of role: com.test.hibernate.ChildEntity.parents, no session or session was closed
via Spring JIRA by Siarhei Sakovich, 2 years ago
failed to lazily initialize a collection of role: com.test.hibernate.ChildEntity.parents, no session or session was closed
via Oracle Community by 843833, 1 year ago
failed to lazily initialize a collection of role: entities.User.userattributeCollection, no session or session was closed
via scriptscoop.net by Unknown author, 2 years ago
failed to lazily initialize a collection of role: ru.hostlux.emailmanager.entity.hldovecot .DovecotHost.domains, no session or session was closed
via Stack Overflow by Caleb
, 2 years ago
failed to lazily initialize a collection, no session or session was closed
via Stack Overflow by mtchinthaka
, 2 years ago
failed to lazily initialize a collection of role: com.pos.entities.Item.itemPrices, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.test.hibernate.ChildEntity.parents, no session or session was closed	at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)	at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)	at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:119)	at org.hibernate.collection.PersistentSet.size(PersistentSet.java:162)	at org.hibernate.search.engine.DocumentBuilderContainedEntity.processContainedInInstances(DocumentBuilderContainedEntity.java:644)	at org.hibernate.search.engine.DocumentBuilderContainedEntity.addWorkToQueue(DocumentBuilderContainedEntity.java:612)	at org.hibernate.search.backend.impl.BatchedQueueingProcessor.addWorkToBuilderQueue(BatchedQueueingProcessor.java:270)	at org.hibernate.search.backend.impl.BatchedQueueingProcessor.processWorkByLayer(BatchedQueueingProcessor.java:248)	at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWorks(BatchedQueueingProcessor.java:147)	at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.beforeCompletion(PostTransactionWorkQueueSynchronization.java:70)	at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransactionContext.java:144)	at org.hibernate.engine.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:530)	at org.hibernate.engine.ActionQueue.beforeTransactionCompletion(ActionQueue.java:211)	at org.hibernate.impl.SessionImpl.beforeTransactionCompletion(SessionImpl.java:563)	at org.hibernate.jdbc.JDBCContext.beforeTransactionCompletion(JDBCContext.java:229)	at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:96)	at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:271)	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:176)	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1396)	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:138)	at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:374)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)	at com.test.hibernate.TestService$$EnhancerByCGLIB$$f6772efb.update()	at com.test.hibernate.TestHb.testHb(TestHb.java:26)