JIRA drops LDAP configuration - java.naming.provider.url property does not contain a URL

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

Symptoms

Trying to log into JIRA results in either an "Operation Failed" or "Sorry, an Error Occurred" error.

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 2011-12-19 12:39:00,406 http-443-7 ERROR anonymous 759x490x1 wv7mlb 10.121.70.121 /rest/gadget/1.0/login [jira.security.login.JiraSeraphAuthenticator] Error occurred while trying to authenticate user 'testuser'. com.atlassian.crowd.exception.runtime.OperationFailedException at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:869) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:79) at com.atlassian.crowd.embedded.core.DelegatingCrowdService.authenticate(DelegatingCrowdService.java:35) ... Caused by: org.springframework.ldap.ConfigurationException: java.naming.provider.url property does not contain a URL; nested exception is javax.naming.ConfigurationException: java.naming.provider.url property does not contain a URL at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:101) at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:266) at org.springframework.ldap.core.support.AbstractContextSource.getContext(AbstractContextSource.java:106)

or

1 2 3 4 5 6 7 8 9 10 11 12 2012-04-30 16:24:32,849 http-8080-2 ERROR [500ErrorPage.jsp] Exception caught in 500 page null com.atlassian.crowd.exception.runtime.OperationFailedException at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:869) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:79) ... Caused by: java.lang.IllegalArgumentException: org.apache.commons.httpclient.URIException: URI-Reference required at com.atlassian.crowd.integration.rest.service.RestExecutor.<init>(RestExecutor.java:77) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.<init>(RestCrowdClient.java:78) ... Caused by: org.apache.commons.httpclient.URIException: URI-Reference required at org.apache.commons.httpclient.URI.parseUriReference(URI.java:1874) at org.apache.commons.httpclient.URI.<init>(URI.java:165)

Diagnosis

JIRA is using LDAP or Crowd for user management. After restarting the application, the LDAP configuration is missing connection parameters. This can be verified by querying the database:

  1. Identify the ID for the LDAP/Crowd directory:

    1 select * from cwd_directory
  2. Take note of the ID for the LDAP/Crowd User Directory.

  3. Using the ID from above:

    1 select * from cwd_directory_attribute where directory_id = 'XXXXX';
  4. If this returned only a few rows, then it's likely the configuration has somehow been lost.

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 directory_id | attribute_name | attribute_value --------------+--------------------------------------------+---------------------------------------- 10000 | ldap.user.displayname | displayName 10000 | ldap.usermembership.use | false 10000 | ldap.group.objectclass | groupOfUniqueNames 10000 | ldap.user.objectclass | inetorgperson 10000 | ldap.user.firstname | givenName 10000 | ldap.group.description | description 10000 | ldap.pagedresults | false 10000 | ldap.group.usernames | uniqueMember 10000 | ldap.user.group | memberOf 10000 | ldap.user.filter | (objectclass=inetorgperson) 10000 | ldap.password | secret 10000 | crowd.delegated.directory.auto.create.user | true 10000 | ldap.user.username.rdn | cn 10000 | ldap.group.filter | (objectclass=groupOfUniqueNames) 10000 | crowd.delegated.directory.auto.update.user | true 10000 | ldap.user.username | cn 10000 | ldap.group.dn | 10000 | ldap.user.email | mail 10000 | autoAddGroups | 10000 | ldap.basedn | o=sevenSeas 10000 | ldap.url | ldap://liver:10389 10000 | crowd.delegated.directory.importGroups | false 10000 | ldap.usermembership.use.for.groups | false 10000 | ldap.referral | false 10000 | ldap.user.lastname | sn 10000 | ldap.userdn | uid=admin, ou=system 10000 | ldap.pagedresults.size | 1000 10000 | ldap.group.name | cn 10000 | ldap.user.dn | 10000 | crowd.delegated.directory.type | com.atlassian.crowd.directory.ApacheDS 10000 | ldap.nestedgroups.disabled | false (31 rows)

Cause

The configuration for either LDAP or Crowd has been lost. The root cause is currently unknown.

Solution

Resolution

Method 1

  • Log in as your JIRA's local admin and re-configure the same LDAP directory that lost the configuration. Creating a new directory with the same configuration will cause you to lose local group memberhips.

  • If you do not know or have a local admin, see here: Retrieving the JIRA Administrator.

Method 2

Only use this method if you are familiar/experienced with both your LDAP configuration and administering a database.

  • Manually input the information into the database

  • Use the above sample results to help input the data.

Please see our Troubleshooting LDAP User Management documentation for further assistance with diagnosing LDAP problems.

SSO will need to be disabled to log in as the local administrator. Instructions on disabling this function can be found in our article on Integrating Crowd with Atlassian JIRA

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.