org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null

Atlassian JIRA | Don Willis [Atlassian] | 9 years ago
  1. 0

    The \{content-by-user\} macro generates an error stack trace when that user has drafts. {noformat:title=the error} java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 1146892, type: page, title: Home} no suitable delegate found. at com.atlassian.confluence.security.DefaultPermissionManager.findDelegateFor(DefaultPermissionManager.java:119) at com.atlassian.confluence.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:31) at com.atlassian.confluence.security.DefaultPermissionManager.getPermittedEntities(DefaultPermissionManager.java:49) at sun.reflect.GeneratedMethodAccessor494.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy32.getPermittedEntities(Unknown Source) at com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.fetchContent(ContentByUserMacro.java:75) at com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.getHtml(ContentByUserMacro.java:46) {noformat} The fix for CONF-9701 is not sufficient to fix this bug, because even when a permission delegate is added, the macro fails to render because the Draft object has no URL. {noformat:title=there's no url} 2007-10-25 14:01:29,350 ERROR [http-8080-Processor3] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: templates/macros/co ntentbyuser.vm -- url: /display/~admin/cbm+macro | userName: admin | action: viewpage | page: 360453 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:188) at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:226) {noformat}

    Atlassian JIRA | 9 years ago | Don Willis [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null
  2. 0

    The \{content-by-user\} macro generates an error stack trace when that user has drafts. {noformat:title=the error} java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 1146892, type: page, title: Home} no suitable delegate found. at com.atlassian.confluence.security.DefaultPermissionManager.findDelegateFor(DefaultPermissionManager.java:119) at com.atlassian.confluence.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:31) at com.atlassian.confluence.security.DefaultPermissionManager.getPermittedEntities(DefaultPermissionManager.java:49) at sun.reflect.GeneratedMethodAccessor494.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy32.getPermittedEntities(Unknown Source) at com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.fetchContent(ContentByUserMacro.java:75) at com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.getHtml(ContentByUserMacro.java:46) {noformat} The fix for CONF-9701 is not sufficient to fix this bug, because even when a permission delegate is added, the macro fails to render because the Draft object has no URL. {noformat:title=there's no url} 2007-10-25 14:01:29,350 ERROR [http-8080-Processor3] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: templates/macros/co ntentbyuser.vm -- url: /display/~admin/cbm+macro | userName: admin | action: viewpage | page: 360453 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:188) at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:226) {noformat}

    Atlassian JIRA | 9 years ago | Don Willis [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null
  3. 0

    Confluence v 4.3.7 troubles

    GitHub | 4 years ago | gargouri22
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDescriptionAndAuthor' in class com.atlassian.confluence.plugins.macros.advanced.recentupdate.ContentUpdateItem threw exception java.lang.NoSuchMethodError: com.atlassian.confluence.links.linktypes.UserProfileLink.getLinkPath(Ljava/lang/String;)Ljava/lang/String; at /com/atlassian/confluence/plugins/macros/advanced/recentupdate/themes/concise/updates.vm[line 11, column 51]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException on adding attachment in confluence

    Stack Overflow | 2 years ago
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDownloadPath' in class com.atlassian.confluence.pages.Attachment threw exception java.lang.NullPointerException at /pages/includes/attachments-table.vm[line 90, column 111]
  6. 0

    GitHub comment 19#164723929

    GitHub | 12 months ago | NicolasEsteves
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getSpacesAsSpaceAdminForUser' in class csum.confluence.permissionmgmt.CustomPermissionManagerAction threw exception java.lang.NoSuchMethodError: com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getSpaces(Lcom/atlassian/confluence/spaces/SpacesQuery;)Ljava/util/List; at /templates/permissionmgmt/display.vm[line 227, column 49]

    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 'getUrlPath' in class com.atlassian.confluence.pages.Draft threw exception class java.lan g.UnsupportedOperationException : null

      at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute()
    2. Apache Velocity
      ASTIdentifier.execute
      1. org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:188)
      2. org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:226)
      2 frames