java.lang.NullPointerException

Atlassian JIRA | David Taylor [Atlassian] | 8 years ago
  1. 0

    https://bamboo.extranet.atlassian.com/browse/CONFFUNC-CLUST5MYSQLR-940 failed due to a number of tests being unable to create the test1 user. Errors for tests were of the form: {code} java.lang.RuntimeException: org.apache.xmlrpc.XmlRpcException: java.lang.Exception: java.lang.NullPointerException at com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.xmlRpcExecute(DefaultUserManagementHelper.java:85) at com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.createUser(DefaultUserManagementHelper.java:30) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1746) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1758) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createTestUser1ViaHelper(AbstractConfluenceAcceptanceTest.java:1768) at com.atlassian.confluence.SpaceAdminPermissionsAcceptanceTest.setUp(SpaceAdminPermissionsAcceptanceTest.java:26) at junit.framework.TestCase.runBare(TestCase.java:125) at net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:58) {code} The corresponding server error for the RPC exception is: {code} java.lang.NullPointerException at com.atlassian.user.impl.delegation.DelegatingUserManager.createUser(DelegatingUserManager.java:102) at bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:91) at bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:66) at com.atlassian.confluence.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:115) at sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) {code} Around line 102 of DelegatingUserManager: {code} User preexistingUser; try { preexistingUser = getUser(username); } catch (EntityException e) { throw new EntityException("Couldn't check whether user already exists", e); } if (preexistingUser != null) throw new DuplicateEntityException("User [" + username + "] already exists in " + getRepository(preexistingUser).getName()); {code} The null-pointer is in the last line, so the {{preexistingUser}} is found but when looking up the repository that user belongs to {{null}} is returned. As the {{userManager}} being used is a {{CachingUserManager}}, it seems that the user cache is incorrect, finding that the user exists after all users have been removed (in {{AbstractConfluenceAcceptanceTest.cleanup()}}. The repository cache *is* correct, with no entry for the user, hence the null pointer exception. The problem could be cluster-specific, but the first failing test {{AntiXSSAcceptanceTest.testVelocityStaticRenderingWithAntiXssModeDisabled}} had the two previous tests clearing users successfully on the same node (see https://bamboo.extranet.atlassian.com/browse/CONFFUNC-CLUST5MYSQLR-940/artifact/All-logs/output-node1.log). Might be that logging {{CachingUserManager.removeUser}} will show the user existing in the cache after the remove, due to some cluster-cache-syncing timing issue hoodoo.

    Atlassian JIRA | 8 years ago | David Taylor [Atlassian]
    java.lang.NullPointerException
  2. 0

    https://bamboo.extranet.atlassian.com/browse/CONFFUNC-CLUST5MYSQLR-940 failed due to a number of tests being unable to create the test1 user. Errors for tests were of the form: {code} java.lang.RuntimeException: org.apache.xmlrpc.XmlRpcException: java.lang.Exception: java.lang.NullPointerException at com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.xmlRpcExecute(DefaultUserManagementHelper.java:85) at com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.createUser(DefaultUserManagementHelper.java:30) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1746) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1758) at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createTestUser1ViaHelper(AbstractConfluenceAcceptanceTest.java:1768) at com.atlassian.confluence.SpaceAdminPermissionsAcceptanceTest.setUp(SpaceAdminPermissionsAcceptanceTest.java:26) at junit.framework.TestCase.runBare(TestCase.java:125) at net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:58) {code} The corresponding server error for the RPC exception is: {code} java.lang.NullPointerException at com.atlassian.user.impl.delegation.DelegatingUserManager.createUser(DelegatingUserManager.java:102) at bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:91) at bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:66) at com.atlassian.confluence.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:115) at sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) {code} Around line 102 of DelegatingUserManager: {code} User preexistingUser; try { preexistingUser = getUser(username); } catch (EntityException e) { throw new EntityException("Couldn't check whether user already exists", e); } if (preexistingUser != null) throw new DuplicateEntityException("User [" + username + "] already exists in " + getRepository(preexistingUser).getName()); {code} The null-pointer is in the last line, so the {{preexistingUser}} is found but when looking up the repository that user belongs to {{null}} is returned. As the {{userManager}} being used is a {{CachingUserManager}}, it seems that the user cache is incorrect, finding that the user exists after all users have been removed (in {{AbstractConfluenceAcceptanceTest.cleanup()}}. The repository cache *is* correct, with no entry for the user, hence the null pointer exception. The problem could be cluster-specific, but the first failing test {{AntiXSSAcceptanceTest.testVelocityStaticRenderingWithAntiXssModeDisabled}} had the two previous tests clearing users successfully on the same node (see https://bamboo.extranet.atlassian.com/browse/CONFFUNC-CLUST5MYSQLR-940/artifact/All-logs/output-node1.log). Might be that logging {{CachingUserManager.removeUser}} will show the user existing in the cache after the remove, due to some cluster-cache-syncing timing issue hoodoo.

    Atlassian JIRA | 8 years ago | David Taylor [Atlassian]
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

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

      No message provided

      at com.atlassian.user.impl.delegation.DelegatingUserManager.createUser()
    2. com.atlassian.user
      DelegatingUserManager.createUser
      1. com.atlassian.user.impl.delegation.DelegatingUserManager.createUser(DelegatingUserManager.java:102)
      1 frame
    3. bucket.user
      DefaultUserAccessor.addUser
      1. bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:91)
      2. bucket.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:66)
      2 frames
    4. com.atlassian.confluence
      DefaultUserAccessor.addUser
      1. com.atlassian.confluence.user.DefaultUserAccessor.addUser(DefaultUserAccessor.java:115)
      1 frame
    5. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2 frames