Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-24582

Hibernate lazy init error

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.2
    • Fix Version/s: 2.7.2, 2.8.1, 2.9.0
    • Component/s: Messages Tool
    • Labels:
      None
    • Previous Issue Keys:
      MSGCNTR-486

      Description

      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:839)
      caused by: org.sakaiproject.tool.api.ToolException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1303)
      caused by: org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
      caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
      caused by: javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
      caused by: javax.faces.el.EvaluationException: Error getting property 'attachList' from bean of type org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
      caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.attachmentsSet, no session or session was closed
      at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
      at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
      at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
      at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
      at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
      at org.sakaiproject.component.app.messageforums.dao.hibernate.Util.setToList(Util.java:34)
      at org.sakaiproject.component.app.messageforums.dao.hibernate.TopicImpl.getAttachments(TopicImpl.java:97)
      at org.sakaiproject.tool.messageforums.ui.DiscussionTopicBean.getAttachList(DiscussionTopicBean.java:813)
      at sun.reflect.GeneratedMethodAccessor2199.invoke(null:-1)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
      at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
      at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
      at com.sun.faces.el.impl.UnaryOperatorExpression.evaluate(UnaryOperatorExpression.java:167)
      at com.sun.faces.el.impl.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:165)
      at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
      at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
      at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:315)

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  baholladay Bryan Holladay
                  Reporter:
                  arwhyte Anthony Whyte
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration