org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45]

Atlassian JIRA | Daniel Ponzio [Atlassian] | 1 year ago
  1. 0

    h3. Summary When using the $permissionHelper.canEdit($action.remoteUser, $pageVar) with a user and page Object, if the function returns true it displays 'true' in a page. If the user does not have permission, this should return false. Instead it returns the stack trace below. h3. Environment * Mac OS X * Java 1.8 h3. Steps to Reproduce # Create a user macro to read in a target page and then check if the user has permission as follows: {code} ## @param Page:title=Target Page|type=confluence-content|required=true|desc=check if editable $permissionHelper.canEdit($action.remoteUser, $paramPage) {code} h3. Expected Results If the function returns true it displays 'true'. If the user does not have permission, this should return 'false'. h3. Actual Results The below exception is thrown in the browser: {noformat} Oops - an error has occurred logo System Error A system error has occurred — our apologies! For immediate troubleshooting, consult our knowledge base for a solution. If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information: a description of your problem and what you were doing at the time it occurred a copy of the error and system information found below a copy of the application logs (if possible). Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) caused by: java.lang.RuntimeException: Error rendering template for decorator page at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) 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) Stack Trace:[hide] java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) ... Caused by: net.sf.hibernate.HibernateException: collection was evicted at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3332) at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195) ... 487 more {noformat} h3.Workaround No workaround found so far

    Atlassian JIRA | 1 year ago | Daniel Ponzio [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45]
  2. 0

    h3. Summary When using the $permissionHelper.canEdit($action.remoteUser, $pageVar) with a user and page Object, if the function returns true it displays 'true' in a page. If the user does not have permission, this should return false. Instead it returns the stack trace below. h3. Environment * Mac OS X * Java 1.8 h3. Steps to Reproduce # Create a user macro to read in a target page and then check if the user has permission as follows: {code} ## @param Page:title=Target Page|type=confluence-content|required=true|desc=check if editable $permissionHelper.canEdit($action.remoteUser, $paramPage) {code} h3. Expected Results If the function returns true it displays 'true'. If the user does not have permission, this should return 'false'. h3. Actual Results The below exception is thrown in the browser: {noformat} Oops - an error has occurred logo System Error A system error has occurred — our apologies! For immediate troubleshooting, consult our knowledge base for a solution. If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information: a description of your problem and what you were doing at the time it occurred a copy of the error and system information found below a copy of the application logs (if possible). Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) caused by: java.lang.RuntimeException: Error rendering template for decorator page at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) 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) Stack Trace:[hide] java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:202) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.Template.merge(Template.java:328) ... Caused by: net.sf.hibernate.HibernateException: collection was evicted at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3332) at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195) ... 487 more {noformat} h3.Workaround No workaround found so far

    Atlassian JIRA | 1 year ago | Daniel Ponzio [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45]
  3. 0

    Chat history - A system error has occurred

    GitHub | 3 years ago | sniadek
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'canView' in class com.atlassian.confluence.security.PermissionHelper threw exception java.lang.IllegalArgumentException: Could not check permissions for michals no suitable delegate found. at template/includes/macros.vm[line 1308, column 39]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [CONF-38084] Error when visiting pages with JIRA integrations, caused by duplicate AppLinks keys - Atlassian JIRA

    atlassian.com | 1 year ago
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 125, column 45]
  6. 0

    h5. Steps to Reproduce # Change system locale to Turkish # Go to {{Dashboard -> Administration -> View Global Permissions}} # Edit Permissions You will get a System Error page with something like this {code} org.apache.velocity.exception.MethodInvocationException: Invocation of method 'canSetPermissionOnGroup' in class com.atlassian.confluence.security.actions.EditGlobalPermissionsAction threw exception java.lang.IllegalArgumentException: Unknown global permission: profileattachments at /admin/permissions/editglobalperms.vm[line 53, column 52] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) caused by: java.lang.IllegalArgumentException: Unknown global permission: profileattachments at com.atlassian.confluence.security.administrators.EditGlobalPermissionsAdministrator.canSetPermissionOnGroup(EditGlobalPermissionsAdministrator.java:100) {code} \\ h5. Findings || Confluence Version || Remark || | 3.1, 3.1.1, 3.1.2, 3.2 | Tested and affected | | 2.10.4, 3.0.0_01, 3.0.1, 3.0.2 | Unable to test due to [CONF-17160] | \\ h5. Workaround Cited from [CONF-7168|http://jira.atlassian.com/browse/CONF-7168?focusedCommentId=67700&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_67700] {quote} As a work-around, please pass these arguments to your JVM by adding them to JAVA_OPTS in setenv.bat: -Duser.country=EN -Duser.language=en {quote}

    Atlassian JIRA | 7 years ago | Husein Alatas [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'canSetPermissionOnGroup' in class com.atlassian.confluence.security.actions.EditGlobalPermissionsAction threw exception java.lang.IllegalArgumentException: Unknown global permission: profileattachments at /admin/permissions/editglobalperms.vm[line 53, column 52]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.velocity.exception.MethodInvocationException

      Invocation of method 'getDisplayableItems' in class com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 133, column 45]

      at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException()
    2. Apache Velocity
      ASTMethod.handleInvocationException
      1. org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
      1 frame