Unable to load atlassian-user configuration - LDAP

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bamboo fails to use the configured BAMBOO_HOME/xml-data/configuration/atlassian-user.xml file to connect to LDAP and shows this error:

2013-05-23 10:07:59,542 ERROR [main] [ContextLoader] Context initialization failed
...
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
	at com.atlassian.bamboo.server.Server.main(Server.java:74)
Caused by: com.atlassian.user.configuration.ConfigurationException: Unable to load atlassian-user configuration: org.dom4j.DocumentException: Error on line 15 of document  : The entity name must immediately follow the '&' in the entity reference. Nested exception: The entity name must immediately follow the '&' in the entity reference.
	at com.atlassian.user.configuration.xml.XMLConfigurationParser.parse(XMLConfigurationParser.java:93)
	at com.atlassian.user.configuration.xml.XMLConfiguration.init(XMLConfiguration.java:91)
	at com.atlassian.crowd.integration.atlassianuser.AbstractDynamicUserConfiguration.loadConfiguration(AbstractDynamicUserConfiguration.java:56)
	at com.atlassian.crowd.integration.atlassianuser.AbstractDynamicUserConfiguration.<init>(AbstractDynamicUserConfiguration.java:24)
	at com.atlassian.crowd.integration.atlassianuser.AbstractDynamicUserConfiguration$$EnhancerByCGLIB$$903464da.<init>(<generated>)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
...

Cause

There is a wrong usage of the ampersand sign (&) in the filter configuration of the atlassian-user.xml file.

Resolution

The ampersand signs in the atlassian-user.xml file should be escaped. If you have anything like this:

<userSearchFilter>(&(objectCategory=Person)(sAMAccountName=*))</userSearchFilter>

Please replace that line with this:

<userSearchFilter>(&amp;(objectCategory=Person)(sAMAccountName=*))</userSearchFilter>

Note how the ampersand is escaped. For more information about LDAP filters, you can refer to this page.

 

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.