Login Failed with NullPointerException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Login fails after restoring XML backup from cloud with NullPointerException. It may also occur when password is somehow null or empty due to data inconsistency.
StackTrace
1
2
3
4
5
6
7
Caused by: java.lang.NullPointerException
at com.atlassian.crowd.directory.AbstractInternalDirectory.authenticate(AbstractInternalDirectory.java:386)
at com.atlassian.crowd.directory.AbstractInternalDirectory.processAuthentication(AbstractInternalDirectory.java:242)
at com.atlassian.crowd.directory.AbstractInternalDirectory.authenticate(AbstractInternalDirectory.java:205)
at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.authenticateUser(DirectoryManagerGeneric.java:305)
at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.authenticateUser(ApplicationServiceGeneric.java:186)
at com.atlassian.jira.user.JiraDelegatingCrowdService.authenticate(JiraDelegatingCrowdService.java:34)
Environment
It is applicable to all the versions of Jira with Internal Directory used for authentication.
Diagnosis
Check if the
cwd_user
table contains valid encrypted credentials in case of Internal directory.The
credentials
column in tablecwd_user
could be empty after restore.In case of internal Directory, JIRA authenticates users by check the credentials column in cwd_user table.
Cause
With empty or Null column value in
credentials
column incwd_user
table, JIRA could not authenticate.
Solution
Re-import the xml backup from the source / cloud and ensure it contains the
credential
before you re-import to target Database as shown below.1 2 3 4
user@C02G40SVMD6R export % grep -i credential ./entities.xml | grep PKCS5S2 emailAddress="sysadmin@localhost.localdomain" lowerEmailAddress="sysadmin@localhost.localdomain" credential="{PKCS5S2}R+BJAdk3nuzFdPM7xgH9f6dp1SvPCTa57Z4LZvMj4kKcpcBvOBoBsW5rMs/xoydN"/> <UserHistoryItem id="10002" type="RapidView" entityId="2" username="ug:0a3150b2-f945-4463-8610-f845d505ee7b" lastViewed="1656600432367" data="AS board"/>
Was this helpful?