com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!

Atlassian JIRA | Kah Loun Foong [Atlassian] | 5 years ago
  1. 0

    *Steps to reproduce* # Create a username 'admin ' (with a space at the end) in Crowd server (2.1.1 and 2.2.7) # Integrate JIRA 4.4 with Crowd server and synchronize the directory # Login with the username 'admin' (without a space) will have the following error: {noformat} 2011-08-08 11:03:20,411 http-8440-1 ERROR [500ErrorPage.jsp] Exception caught in 500 page user should not be null! com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26) at com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135) at com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46) at com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127) {noformat} # User must login with username 'admin ' (with a space at the end) # The same thing happen to JIRA 4.3 without any error in the log The screenshot is a test login with username 'test' (without space) and the Crowd username is 'test ' (with a space) When login with other user, we can see that a lot of JIRA function related to this username 'admin ' (with a space) is broken such as the Activity Stream *Workaround* Modify Crowd database for the username with XML backup # Export the Crowd database to XML backup # Check and edit the username in the XML backup (it seems that the space is not exported to the XML) # Re-import the XML to Crowd server and synchronize Atlassian application again with Crowd

    Atlassian JIRA | 5 years ago | Kah Loun Foong [Atlassian]
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!
  2. 0

    *Steps to reproduce* # Create a username 'admin ' (with a space at the end) in Crowd server (2.1.1 and 2.2.7) # Integrate JIRA 4.4 with Crowd server and synchronize the directory # Login with the username 'admin' (without a space) will have the following error: {noformat} 2011-08-08 11:03:20,411 http-8440-1 ERROR [500ErrorPage.jsp] Exception caught in 500 page user should not be null! com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26) at com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135) at com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46) at com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127) {noformat} # User must login with username 'admin ' (with a space at the end) # The same thing happen to JIRA 4.3 without any error in the log The screenshot is a test login with username 'test' (without space) and the Crowd username is 'test ' (with a space) When login with other user, we can see that a lot of JIRA function related to this username 'admin ' (with a space) is broken such as the Activity Stream *Workaround* Modify Crowd database for the username with XML backup # Export the Crowd database to XML backup # Check and edit the username in the XML backup (it seems that the space is not exported to the XML) # Re-import the XML to Crowd server and synchronize Atlassian application again with Crowd

    Atlassian JIRA | 5 years ago | Kah Loun Foong [Atlassian]
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!
  3. 0

    If you use aliases from Crowd instance for account with have the following format username@domain.com and change them to username without @* When you look into the created issues the commenter who's account was aliased is showing in grey color and the account does not exist. In the logs, this translates too: {noformat} 2012-01-18 21:03:42,852 http-8444-4 ERROR [500ErrorPage.jsp] Exception caught in 500 page user should not be null! com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26) at com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135) at com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46) at com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.login(PasswordBasedLoginFilter.java:72) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:130) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40) {noformat}

    Atlassian JIRA | 5 years ago | Malik Mangier
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The symptom is that all Users (also sysadmin) can't log into JIRA. The system just responds with a failed authentication attempt and the log prints out a stack trace like this: {code} com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26) at com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135) at com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46) at com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.crowd.integration.seraph.v22.CrowdAuthenticator.login(CrowdAuthenticator.java:133) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.login(PasswordBasedLoginFilter.java:72) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:130) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) {code} Judging from the code, the actual authentication with Crowd already succeeded (com.atlassian.seraph:atlassian-seraph:2.5.0/com.atlassian.seraph.auth.DefaultAuthenticator.login(HttpServletRequest, HttpServletResponse, String, String, boolean)/line 94:111): {code} final boolean authenticated = authenticate(principal, password); if (dbg) { log.debug(METHOD + "'" + userName + "' has " + (authenticated ? "been" : "not been") + " authenticated"); } if (authenticated) { final Principal user = getUser(userName); if (authoriseUserAndEstablishSession(httpServletRequest, httpServletResponse, user)) { if (setRememberMeCookie && httpServletResponse != null) { getRememberMeService().addRememberMeCookie(httpServletRequest, httpServletResponse, userName); } return true; } AUTHORISATION_FAILED.stampRequestResponse(httpServletRequest, httpServletResponse); } {code} The authenticate call in the first line is the direct authentication with Crowd. The authoriseUserAndEstablishSession(HttpServletRequest, HttpServletResponse, Principal) call corresponds with line 102 of the stack trace above. The problem is that the getUser(String) call before returns null for the user. This call leads to com.atlassian.jira.security.login.JiraSeraphAuthenticator.getUser(String) which just uses com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(String) in order to retrieve the user. This is its code: {code} Application application = getApplication(); if (application == null) { return null; } try { return applicationService.findUserByName(application, name); } catch (com.atlassian.crowd.exception.UserNotFoundException e) { return null; } {code} getApplication() is ultimately retrieving com.atlassian.crowd.dao.application.ApplicationDAO (cwd_application table) with name _crowd-embedded_. This tuple is contained in the db: {code} jira=> select * from cwd_application; id | application_name | lower_application_name | created_date | updated_date | active | description | application_type | credential ----+------------------+------------------------+----------------------------+----------------------------+--------+-------------+------------------+------------ 1 | crowd-embedded | crowd-embedded | 2011-05-08 14:09:05.607-07 | 2011-05-08 14:09:05.607-07 | 1 | | CROWD | X (1 row) {code} The com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(Application, String) code looks as following: {code} for (final Directory directory : getActiveDirectories(application)) { try { return directoryManager.findUserByName(directory.getId(), name); } catch (final UserNotFoundException e) { // user not in directory, keep cycling } catch (final DirectoryNotFoundException e) { // directory not found throw new ConcurrentModificationException("Directory mapping was removed while iterating through directories: " + e.getMessage()); } catch (final OperationFailedException e) { // directory has some massive error, keep cycling logger.error(e.getMessage(), e); } } // could not find user in any of the directories throw new UserNotFoundException(name); {code} It iterates over the active directories and tries to find the user. {code} jira=> select * from cwd_directory; id | directory_name | lower_directory_name | created_date | updated_date | active | description | impl_class | lower_impl_class | directory_type | directory_position ----+-------------------------+-------------------------+----------------------------+----------------------------+--------+---------------------------------+----------------------------------------------------+----------------------------------------------------+----------------+-------------------- 2 | Remote Crowd Directory | remote crowd directory | 2011-05-08 14:09:06.142-07 | 2011-05-08 23:50:57.531-07 | 1 | Remote crowd directory | com.atlassian.crowd.directory.RemoteCrowdDirectory | com.atlassian.crowd.directory.remotecrowddirectory | CROWD | 0 1 | JIRA Internal Directory | jira internal directory | 2011-05-08 14:09:06.166-07 | 2011-05-08 23:51:08.015-07 | 0 | JIRA default internal directory | com.atlassian.crowd.directory.InternalDirectory | com.atlassian.crowd.directory.internaldirectory | INTERNAL | 1 (2 rows) {code} The select above shows that there's only one active directory called 'Remote Crowd Directory' which points to the Crowd instance: {code} jira=> select * from cwd_directory_attribute where directory_id=2; directory_id | attribute_name | attribute_value --------------+---------------------------------------------------------+---------------------------------------- 2 | com.atlassian.crowd.directory.sync.lastdurationms | 70 2 | com.atlassian.crowd.directory.sync.laststartsynctime | 1304923857460 2 | com.atlassian.crowd.directory.sync.currentstartsynctime | 2 | useNestedGroups | false 2 | com.atlassian.crowd.directory.sync.issynchronising | false 2 | application.name | jira 2 | application.password | foobar 2 | crowd.server.url | http://<customerinstance>.jira.com/crowd/ (8 rows) {code} The actual directory implementation will lead to com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(String) which will just ask com.atlassian.crowd.embedded.ofbiz.OfBizUserDao.findByName(long, String) in the end. The implementation seems to be a bridge for the legacy OfBizUser code. It only asks a _ConcurrentMap<DirectoryEntityKey, OfBizUser> userCache_ first with the username and then with the lowercased username: {code} // Try with the case we have been given. // This is an optimisation that should work in most JIRA instances where group and user names are really all lower case. OfBizUser user = userCache.get(DirectoryEntityKey.getKeyPreserveCase(directoryId, userName)); if (user != null) { return user; } user = userCache.get(DirectoryEntityKey.getKey(directoryId, userName)); if (user == null) { // Because the SPI says we should do this. throw new UserNotFoundException(userName); } return user; {code} I hooked up a debugger to a customer instance and it turns out that userCache is empty. Judging from the implementation, there has to be an initial call to fill the cache. There are three public methods which would add users, com.atlassian.crowd.embedded.ofbiz.OfBizUserDao.flushCache() which only has com.atlassian.crowd.embedded.ofbiz.OfBizUserDao.onEvent(XMLRestoreFinishedEvent) as a client (import), com.atlassian.crowd.embedded.ofbiz.OfBizUserDao.add(User, PasswordCredential) and com.atlassian.crowd.embedded.ofbiz.OfBizUserDao.addAll(Set<UserTemplateWithCredentialAndAttributes>). One indirect client of addAll is com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(JobExecutionContext) which I suspect to be responsible for the (initial) syncing. That job either didn't run or had problems. In order to workaround the job not syncing, we can trigger the synchronisation manually on *{{/plugins/servlet/embedded-crowd/directories/list}}*. If the directories are not synced, cwd_user, cwd_group and cwd_membership will be empty for that directory. So in order to get into the system, you have to manually create the sysadmin (nopass is not used since we only authenticate against Crowd, see code above): {code:sql} insert into cwd_user (id, directory_id, user_name, lower_user_name, active, created_date, updated_date, first_name, lower_first_name, last_name, lower_last_name, display_name, lower_display_name, email_address, lower_email_address, credential) values (1, 2, 'sysadmin', 'sysadmin', 1, now(), now(), 'System', 'system', 'Administrator', 'administrator', 'System Administrator', 'system administrator', 'noreply@atlassian.com', 'noreply@atlassian.com', 'nopass'); insert into cwd_group (id, group_name, lower_group_name, active, local, created_date, updated_date, group_type, directory_id) values (1, 'system-administrators', 'system-administrators', 1, 0, now(), now(), 'GROUP', 2); insert into cwd_membership (id, parent_id, child_id, membership_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) values (1, 1, 1, 'GROUP_USER', 'system-administrators', 'system-administrators', 'sysadmin', 'sysadmin', 2); {code}

    Atlassian JIRA | 6 years ago | Fabian Krämer
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!
  6. 0

    When user try to login via _http://<path to JIRA>/login.jsp_ and user is actually do not exist in JIRA database, the following exception will be throw to user interface if user is not actually: {code} com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26) at com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135) at com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46) at com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.crowd.integration.seraph.v22.CrowdAuthenticator.login(CrowdAuthenticator.java:133) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127) at com.atlassian.seraph.filter.PasswordBasedLoginFilter.login(PasswordBasedLoginFilter.java:72) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:130) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463) at com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Unknown Source) {code} *Connection topology:* JIRA(Embedded Crowd) using Atlassian Crowd directory --> Crowd(Using Delegated Authentication Directory) --> LDAP(AD) *Steps to replicate:* # Configure JIRA to Crowd without using SSO # Create a new user in LDAP server # Configure Crowd to use Delegated Authentication Directory to connect with LDAP # Configure the Crowd directory Default Group Memberships to have jira-users # Login in to JIRA with the user # User probably able to login to JIRA # Delete the user from JIRA # Shut down JIRA # Change the seraph-config.xml to use the following authenticator: {code} <authenticator class="com.atlassian.jira.security.login.SSOSeraphAuthenticator"/> {code} # Start JIRA and try to login with the LDAP user again This scenario only happen when using the SSO class in seraph-config.xml to enable SSO: {code} <authenticator class="com.atlassian.jira.security.login.SSOSeraphAuthenticator"/> {code}

    Atlassian JIRA | 5 years ago | Zed Yap [Atlassian]
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!

    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. com.atlassian.jira.util.dbc.Assertions$NullArgumentException

      user should not be null!

      at com.atlassian.jira.util.dbc.Assertions.notNull()
    2. com.atlassian.jira
      JiraRoleMapper.canLogin
      1. com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:26)
      2. com.atlassian.jira.security.login.LoginManagerImpl.authorise(LoginManagerImpl.java:135)
      3. com.atlassian.jira.security.JiraRoleMapper.canLogin(JiraRoleMapper.java:46)
      3 frames
    3. com.atlassian.seraph
      PasswordBasedLoginFilter.runAuthentication
      1. com.atlassian.seraph.auth.DefaultAuthenticator.isAuthorised(DefaultAuthenticator.java:229)
      2. com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:197)
      3. com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102)
      4. com.atlassian.seraph.filter.PasswordBasedLoginFilter.runAuthentication(PasswordBasedLoginFilter.java:127)
      4 frames