Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-38914

Confluence pages fail to render after making malformed API method call to labelManager.getContentInSpaceForLabel

    XMLWordPrintable

Details

    Description

      Summary

      Confluence pages show a stacktrace when a malformed labelManager.getContentInSpaceForLabel call is made

      Steps to Reproduce

      1. Install Confluence
      2. Create a user macro with the following:
        #set($labelmanager=$action.getLabelManager())
        #set($label = new Label("test");)
        $labelmanager.getContentInSpaceForLabel(0,10,"SDA",$label).getList()
        $labelmanager.getContentForLabel(0, 10, $label).getList()

      Expected Results

      Even thought the request is not corect, it should show everything working except for the bugged user macro

      Actual Results

      The page displays a stack trace
      The below exception is thrown in the xxxxxxx.log file:

      java.lang.RuntimeException: Error rendering template for decorator root
      at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
      caused by: java.lang.RuntimeException: Error rendering template for decorator page
      at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:191)
      caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getWebInterfaceContext' in class com.atlassian.confluence.pages.actions.ViewPageAction threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 92]
      at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
      caused by: net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
      at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
      caused by: net.sf.hibernate.HibernateException: collection was evicted
      at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3332)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbrannen@atlassian.com Branno
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: