Uploaded image for project: 'Magnolia Personalization'
  1. Magnolia Personalization
  2. MGNLPN-394

CachingPersonalizationContentDecorator causes RepositoryException 'This session has been closed'

    Details

      Description

      A bug in info.magnolia.personalization.decoration.cache.CachingPersonalizationContentDecorator causes some trouble with closed sessions on certain occasions.

      In our case one of our model classes is trying to send a 404 error.
      After forwarding to the 404 page, the CachingPersonalizationContentDecorator returns a node with a closed session und causes an exception (see part of stack trace below)

      For now, we patched the class with a simple refreshNode Method which fetches the node in question and wraps it in a PersonalizationNodeWrapper

      ERROR  info.magnolia.rendering.engine.RenderingFilter 06.07.2017 16:40:42 -- javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed.
      info.magnolia.jcr.RuntimeRepositoryException: javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed.
      	at info.magnolia.jcr.decoration.NodePredicateContentDecorator.evaluateNode(NodePredicateContentDecorator.java:71)
      	at info.magnolia.rendering.engine.RenderingFilter.isVisible(RenderingFilter.java:174)
      	at info.magnolia.rendering.engine.RenderingFilter.handleTemplateRequest(RenderingFilter.java:130)
      	at info.magnolia.rendering.engine.RenderingFilter.doFilter(RenderingFilter.java:94)
      	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
      	at info.magnolia.personalization.filter.VariantResolverFilter.doFilter(VariantResolverFilter.java:133)
      	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	at info.magnolia.cms.filters.AggregatorFilter.doFilter(AggregatorFilter.java:100)
      	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	at info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57)
      	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	at info.magnolia.cms.filters.RepositoryMappingFilter.doFilter(RepositoryMappingFilter.java:108)
      	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              olaf.kozlowski Olaf Kozlowski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: