net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no session or session was closed

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 Atlassian JIRA by Tom Davies [Atlassian], 1 year ago
Failed to lazily initialize a collection - no session or session was closed
via Atlassian JIRA by Tom Davies [Atlassian], 1 year ago
Failed to lazily initialize a collection - no session or session was closed
via springframework by chrisnam1208
, 1 year ago
Failed to lazily initialize a collection
via xplanner by krherrmann
, 1 year ago
Failed to lazily initialize a collection
via xplanner by *anonymous
, 1 year ago
Failed to lazily initialize a collection
via Atlassian JIRA by Mizan Sayed [Atlassian], 1 year ago
Failed to lazily initialize a collection - no session or session was closed
net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no session or session was closed
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:209)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:71)
at net.sf.hibernate.collection.Set.size(Set.java:106)
at com.atlassian.confluence.security.trust.ConfluenceTrustedApplication.getRestrictionsByType(ConfluenceTrustedApplication.java:87)
at com.atlassian.confluence.security.trust.ConfluenceTrustedApplication.getUrlRestrictions(ConfluenceTrustedApplication.java:77)
at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getUrlMatcher(SeraphTrustedApplicationIntegration.java:44)
at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getTrustedApplication(SeraphTrustedApplicationIntegration.java:32)
at com.atlassian.seraph.filter.TrustedApplicationsFilter$AuthenticatorImpl.authenticate(TrustedApplicationsFilter.java:441)
at com.atlassian.seraph.filter.TrustedApplicationsFilter.authenticate(TrustedApplicationsFilter.java:133)
at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:110)
at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94)
at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:544)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at java.lang.Thread.run(Thread.java:613)

Users with the same issue

You are the first who have seen this exception.

Write tip

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