Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.7.5, 5.8.9
-
2
-
Severity 3 - Minor
-
Description
Summary
Confluence pages show a stacktrace when a malformed labelManager.getContentInSpaceForLabel call is made
Steps to Reproduce
- Install Confluence
- 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)