com.atlassian.confluence.core.InsufficientPrivilegeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Despite that running SnipSnap import as a Confluence administrator, Confluence treats the admin user as anonymous due to a wrong context used. The error encountered is: {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat}
    via by Roy Hartono [Atlassian],
  • {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat} Current user appears to be not set correctly, causing permission check to fail when an admin is trying to import snipsnap users and groups. The hack solution is to include: AuthenticatedUserThreadLocal.setUser(context.getCurrentUser()); in {{com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter#doImport()}}.
    via by Roy Hartono [Atlassian],
  • {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat} Current user appears to be not set correctly, causing permission check to fail when an admin is trying to import snipsnap users and groups. The hack solution is to include: AuthenticatedUserThreadLocal.setUser(context.getCurrentUser()); in {{com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter#doImport()}}.
    via by Roy Hartono [Atlassian],
  • Despite that running SnipSnap import as a Confluence administrator, Confluence treats the admin user as anonymous due to a wrong context used. The error encountered is: {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat}
    via by Roy Hartono [Atlassian],
  • h4. Scenario After using the Site Importer tool to restore a Confluence backup, users are presented with the error below when trying to create new users: {noformat} Oops - an error has occurred (https://example.atlassian.net/wiki/)System Error A system error has occurred — our apologies! For immediate troubleshooting, consult our knowledge base (http://confluence.atlassian.com/display/CONFKB/Confluence+Knowledge+Base+Home) for a solution. If you would like to receive support from Atlassian's support team, ask your Confluence administrator (https://example.atlassian.net/wiki/contactadministrators.action) to create a support issue on Atlassian's support system (http://support.atlassian.com/) 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 (https://example.atlassian.net/wiki/admin/raisesupportrequest.action) to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… (https://example.atlassian.net/wiki/) Cause com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:169) {noformat} h4. Cause Apparently the import overwrites the groups in OnDemand, and the *users* group gets deleted in case it is not present in the backup. With the absence of that group, Confluence is unable to include new users to it and throws the error above. h4. Workaround Create the *users* group manually after the import
    via by Jeison Spaniol [Atlassian],
  • The error displayed on screen after failing is: {color:red}Import failed. Check your server logs for more information. User [sysadmin] does not have the required privileges.{color} The import fails and rolls back. *Problem:* When a entities.xml contains a group name with leading or trailing whitespaces the log first shows this error and keeps going: {noformat} com.atlassian.user.impl.EntityValidationException: com.atlassian.crowd.exception.embedded.InvalidGroupException: com.atlassian.crowd.exception.InvalidGroupException: Group name may not contain leading or trailing whitespace at com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.createGroup(EmbeddedCrowdGroupManager.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... {noformat} Later when giving users the memberships: {noformat}INFO [Long running task: Importing data] [confluenceimporter.procesors.post.UserPostImportTask] updateGroupMemberships Adding user xxxx to group GroupName with a space at the end {noformat} a few lines after the last log about memberships we find: {noformat}ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /wiki/admin/import/doimportconfluencesite.action | userName: sysadmin | referer: https://xxxxx.atlassian.net/wiki/admin/import/importconfluencesite.action | action: doimportconfluencesite com.atlassian.confluence.core.InsufficientPrivilegeException: User [sysadmin] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:165) ... {noformat} and checking the entities.xml we find that that particular last GroupName has a trailing whitespace. There might be more than one but it will fail with the first one and rolls back. *Workaround:* Manually remove the whitespace on every group appearance in entities.xml and import again
    via by Mauro Fernandez Badii [Atlassian],
  • The error displayed on screen after failing is: {color:red}Import failed. Check your server logs for more information. User [sysadmin] does not have the required privileges.{color} The import fails and rolls back. *Problem:* When a entities.xml contains a group name with leading or trailing whitespaces the log first shows this error and keeps going: {noformat} com.atlassian.user.impl.EntityValidationException: com.atlassian.crowd.exception.embedded.InvalidGroupException: com.atlassian.crowd.exception.InvalidGroupException: Group name may not contain leading or trailing whitespace at com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.createGroup(EmbeddedCrowdGroupManager.java:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... {noformat} Later when giving users the memberships: {noformat}INFO [Long running task: Importing data] [confluenceimporter.procesors.post.UserPostImportTask] updateGroupMemberships Adding user xxxx to group GroupName with a space at the end {noformat} a few lines after the last log about memberships we find: {noformat}ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /wiki/admin/import/doimportconfluencesite.action | userName: sysadmin | referer: https://xxxxx.atlassian.net/wiki/admin/import/importconfluencesite.action | action: doimportconfluencesite com.atlassian.confluence.core.InsufficientPrivilegeException: User [sysadmin] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:165) ... {noformat} and checking the entities.xml we find that that particular last GroupName has a trailing whitespace. There might be more than one but it will fail with the first one and rolls back. *Workaround:* Manually remove the whitespace on every group appearance in entities.xml and import again
    via by Mauro Fernandez Badii [Atlassian],
    • com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:81)
    No Bugmate found.