Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-19778

Null pointer exception when removing users that exist in the Content_perm table with CPS_ID = null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unsolved Mysteries
    • Medium
    • None
    • 3.2.1
    • None

    Description

      Symptoms

      When trying to remove a user, we get the following stack trace:

      java.lang.NullPointerException
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermission(DefaultContentPermissionManager.java:167)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermissions(DefaultContentPermissionManager.java:204)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeAllUserPermissions(DefaultContentPermissionManager.java:196)
      	at sun.reflect.GeneratedMethodAccessor8176.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	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 $Proxy13.removeAllUserPermissions(Unknown Source)
      
      

      The reason for this is because the user exists in the content_perm table with CPS_ID = null.

      eg:
      id cp_type username groupname cps_id creator creationdate lastmodifier lastmoddate
      491537 View dbrown (null) (null) dbrown 2008-05-31 23:08:02 (null) 2008-06-01 11:44:50

      Workaround

      Run the sql command:

      delete from content_perm where cps_id is null; 
      

      Then go to Administration > Cache Statistics > Advanced > 'Flush All'

      Then try and remove that user again.

      Attachments

        Activity

          People

            vchoy Vincent Choy (Inactive)
            vchoy Vincent Choy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: