After changing the LDAP password in the applicationContext-externalAuth-LDAP-mt.xml file the customer is getting a HTTP 404 error when trying to access JasperSoft.
search cancel

After changing the LDAP password in the applicationContext-externalAuth-LDAP-mt.xml file the customer is getting a HTTP 404 error when trying to access JasperSoft.

book

Article ID: 188940

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

After changing the LDAP password in the applicationContext-externalAuth-LDAP-mt.xml on the JasperSever and after making the change the user was unable to login to JasperServer. They were getting a HTTP 404 error message. 

Environment

Release : 10.3

Component : Spectrum Core / CABI 6.3

Cause

The applicationContext-externalAuth-LDAP-mt.xml file contained a  XML special character in the LDAP password  The $CABI/WebApps/jasperserver-pro/WEB-INF/logs/jasperserver.log file showed the following Exception:

2020-04-16 13:40:21,414 ERROR ContextLoader,localhost-startStop-2:331 - Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 111 in XML document from ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP-mt.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 111; columnNumber: 52; The entity name must immediately follow the '&' in the entity reference.

Resolution

Replacing the special character in the  applicationContext-externalAuth-LDAP-mt.xml password entry below:

<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
        <constructor-arg value="ldap://XXX.XXX.XX.XX:389/DC=XXX,DC=XXX,DC=com"/>
        <!-- manager user name and password (may not be needed)  -->
        <property name="userDn" value="CN=$XXXX,OU=XXX,OU=Service Accounts,DC=XXX,DC=xxx,DC=XX"/>
        <property name="password" value="XXXXXX&99"/>

Replacing the & to use &amp; The new entry looks like the following:

<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
        <constructor-arg value="ldap://XXX.XXX.XX.XX:389/DC=XXX,DC=XXX,DC=com"/>
        <!-- manager user name and password (may not be needed)  -->
        <property name="userDn" value="CN=$XXXX,OU=XXX,OU=Service Accounts,DC=XXX,DC=xxx,DC=XX"/>
        <property name="password" value="XXXXXX&amp;99"/>

After making the change, navigate to the $CABIHOME/ directory and run the stopserver.sh and startservers.sh to resolve the issue.