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
  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.
  3. 0

    Daily reports are not being sent to users when there are drafts in the system. The job errors out as it is building a list of change reports to send out. The following error is being generated in the logs: {noformat} 2007-10-09 00:00:01,376 ERROR [DefaultQuartzScheduler_Worker-1] [org.quartz.core.JobRunShell] run Job DEFAULT.DailyReportJob threw an unhandled Exception: java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 15401071, type: page, title: null} 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 sun.reflect.GeneratedMethodAccessor498.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) 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.hasPermission(Unknown Source) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.userHasAccessTo(ChangeDigestNotificationBean.java:180) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.getAllChangeReportForUser(ChangeDigestNotificationBean.java:81) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.getAllChangeReports(ChangeDigestNotificationBean.java:167) at com.atlassian.confluence.mail.jobs.DailyReportJob.doExecute(DailyReportJob.java:62) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:44) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {noformat}

    Atlassian JIRA | 9 years ago | Gurleen Anand [Atlassian]
    java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 15401071, type: page, title: null} no suitable delegate found.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Daily reports are not being sent to users when there are drafts in the system. The job errors out as it is building a list of change reports to send out. The following error is being generated in the logs: {noformat} 2007-10-09 00:00:01,376 ERROR [DefaultQuartzScheduler_Worker-1] [org.quartz.core.JobRunShell] run Job DEFAULT.DailyReportJob threw an unhandled Exception: java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 15401071, type: page, title: null} 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 sun.reflect.GeneratedMethodAccessor498.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) 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.hasPermission(Unknown Source) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.userHasAccessTo(ChangeDigestNotificationBean.java:180) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.getAllChangeReportForUser(ChangeDigestNotificationBean.java:81) at com.atlassian.confluence.mail.ChangeDigestNotificationBean.getAllChangeReports(ChangeDigestNotificationBean.java:167) at com.atlassian.confluence.mail.jobs.DailyReportJob.doExecute(DailyReportJob.java:62) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:44) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {noformat}

    Atlassian JIRA | 9 years ago | Gurleen Anand [Atlassian]
    java.lang.IllegalArgumentException: Could not check permissions for Draft = { id: 15401071, type: page, title: null} no suitable delegate found.
  6. 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]

    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. 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