java.lang.NullPointerException

Atlassian JIRA | Vincent Choy [Atlassian] | 7 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

    h4. Symptoms When trying to remove a user, we get the following stack trace: {noformat} 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) {noformat} 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 h4. Workaround Run the sql command: {code:sql} delete from content_perm where cps_id is null; {code} Then go to Administration > Cache Statistics > Advanced > 'Flush All' Then try and remove that user again.

    Atlassian JIRA | 7 years ago | Vincent Choy [Atlassian]
    java.lang.NullPointerException
  2. 0

    h4. Symptoms When trying to remove a user, we get the following stack trace: {noformat} 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) {noformat} 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 h4. Workaround Run the sql command: {code:sql} delete from content_perm where cps_id is null; {code} Then go to Administration > Cache Statistics > Advanced > 'Flush All' Then try and remove that user again.

    Atlassian JIRA | 7 years ago | Vincent Choy [Atlassian]
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermission()
    2. com.atlassian.confluence
      DefaultContentPermissionManager.removeAllUserPermissions
      1. com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermission(DefaultContentPermissionManager.java:167)
      2. com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermissions(DefaultContentPermissionManager.java:204)
      3. com.atlassian.confluence.core.DefaultContentPermissionManager.removeAllUserPermissions(DefaultContentPermissionManager.java:196)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor8176.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    4. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    5. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    7. Unknown
      $Proxy13.removeAllUserPermissions
      1. $Proxy13.removeAllUserPermissions(Unknown Source)
      1 frame