java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 1146892, type: page, title: Home} no suitable delegate found.

Atlassian JIRA | Don Willis [Atlassian] | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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]
    java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 1146892, type: page, title: Home} no suitable delegate found.
  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]
    java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 1146892, type: page, title: Home} no suitable delegate found.

    Root Cause Analysis

    1. 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()
    2. com.atlassian.confluence
      DefaultPermissionManager.getPermittedEntities
      1. com.atlassian.confluence.security.DefaultPermissionManager.findDelegateFor(DefaultPermissionManager.java:119)
      2. com.atlassian.confluence.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:31)
      3. com.atlassian.confluence.security.DefaultPermissionManager.getPermittedEntities(DefaultPermissionManager.java:49)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor494.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    4. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      3 frames
    5. com.atlassian.spring
      SpringProfilingInterceptor.invoke
      1. com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
      1 frame
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      1 frame
    7. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      1 frame
    8. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      2 frames
    9. Unknown
      $Proxy32.getPermittedEntities
      1. $Proxy32.getPermittedEntities(Unknown Source)
      1 frame
    10. com.atlassian.confluence
      ContentByUserMacro.getHtml
      1. com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.fetchContent(ContentByUserMacro.java:75)
      2. com.atlassian.confluence.renderer.radeox.macros.ContentByUserMacro.getHtml(ContentByUserMacro.java:46)
      2 frames