java.lang.RuntimeException: org.apache.xmlrpc.XmlRpcException: java.lang.Exception: java.lang.NullPointerException

Atlassian JIRA | David Taylor [Atlassian] | 8 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

    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.RuntimeException: org.apache.xmlrpc.XmlRpcException: java.lang.Exception: 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.RuntimeException: org.apache.xmlrpc.XmlRpcException: java.lang.Exception: java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.RuntimeException

      org.apache.xmlrpc.XmlRpcException: java.lang.Exception: java.lang.NullPointerException

      at com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.xmlRpcExecute()
    2. com.atlassian.confluence
      SpaceAdminPermissionsAcceptanceTest.setUp
      1. com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.xmlRpcExecute(DefaultUserManagementHelper.java:85)
      2. com.atlassian.confluence.usermanagement.DefaultUserManagementHelper.createUser(DefaultUserManagementHelper.java:30)
      3. com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1746)
      4. com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createUserViaHelper(AbstractConfluenceAcceptanceTest.java:1758)
      5. com.atlassian.confluence.AbstractConfluenceAcceptanceTest.createTestUser1ViaHelper(AbstractConfluenceAcceptanceTest.java:1768)
      6. com.atlassian.confluence.SpaceAdminPermissionsAcceptanceTest.setUp(SpaceAdminPermissionsAcceptanceTest.java:26)
      6 frames
    3. JUnit
      TestCase.runBare
      1. junit.framework.TestCase.runBare(TestCase.java:125)
      1 frame
    4. Core - API
      WebTestCase.runBare
      1. net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:58)
      1 frame