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

  1. ,
    via Stack Overflow by JamesENL

    Use the proper ORM annotations (@ManyToOne and @OneToMany).

Solutions on the web

via Stack Overflow by user1058913
, 1 year ago
failed to lazily initialize a collection of role: com.beans.Devices.rules, no session or session was closed
via activiti.org by Unknown author, 1 year ago
failed to lazily initialize a collection of role: org.broadleafcommerce.core.order.domain.OrderImpl.orderAdjustments, could not initialize proxy - no Session
via Stack Overflow by CodeMed
, 2 years ago
failed to lazily initialize a collection of role: org.springframework.samples.knowledgemanager.model.Encounter.providers, could not initialize proxy - no Session
via stackoverflow.com by Unknown author, 2 years ago
via Stack Overflow by Teharez
, 8 months ago
failed to lazily initialize a collection of role: com.company.middleware.microservices.business.util.domain.releasenotes.ReleaseFunction.disabledSubsidiaries, could not initialize proxy - no Session
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.beans.Devices.rules, no session or session was closed	at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:393)	at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:385)	at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:378)	at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:112)	at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:266)	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:95)	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60)	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:99)	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:219)	at com.google.gson.internal.bind.ObjectTypeAdapter.write(ObjectTypeAdapter.java:107)	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:96)	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60)	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:99)	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:219)	at com.google.gson.Gson.toJson(Gson.java:600)	at com.google.gson.Gson.toJson(Gson.java:579)	at org.springframework.http.converter.json.GsonHttpMessageConverter.writeInternal(GsonHttpMessageConverter.java:199)	at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:100)	at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:222)	at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:153)	at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:165)	at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:80)	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at java.lang.Thread.run(Thread.java:745)