Jump to content
We've recently updated our Privacy Statement, available here ×
  • 500 internal server error after logging in as Active Directory user


    dszeto
    • Product: Jasper Deployment

    Issue Description: 

    When logging into JasperReportsServer with external authentication enabled, the following error appears in the browser:

    [toc]
    HTTP Status 500 – Internal Server Error
    Type Exception Report
    
    Message Unprocessed Continuation Reference(s); nested exception is javax.naming.PartialResultException:
    Unprocessed Continuation Reference(s); remaining name ''
    
    Description The server encountered an unexpected condition that prevented it from fulfilling the request.
    
    Exception
    
    org.springframework.ldap.PartialResultException: Unprocessed Continuation Reference(s); nested exception is javax.naming.PartialResultException:
    Unprocessed Continuation Reference(s); remaining name ''

    Resolution:

    PartialResultExceptions are generally found in JasperReportsServer deployments with Active Directory as the external authentication mechanism, although it can apply generally to any LDAP as well. This is because a user search can possibly return multiple entries. The Spring Security framework has a couple of properties you can set to ignore partial result exceptions. You would first need to deploy the attached jar to the below folder:

     jasperserver-pro/WEB-INF/lib  

    and edit the LDAP configuration and change the ldapAuthenticationProvider bean definition as follows:

    <bean id="ldapAuthenticationProvider"
          class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSLdapAuthenticationProvider">
        <constructor-arg>
            <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSADBindAuthenticator">
                <constructor-arg><ref local="ldapContextSource"/></constructor-arg>
                <property name="userSearch" ref="userSearch"/>
            </bean>
        </constructor-arg>
        <constructor-arg>
            <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapAuthoritiesPopulator">
                <constructor-arg index="0"><ref local="ldapContextSource"/></constructor-arg>
                <constructor-arg index="1"><value></value></constructor-arg>
                <property name="groupRoleAttribute" value="CN"/>
                <property name="groupSearchFilter" value="(&amp;(member={0})(objectGroup=class))"/>
                <property name="searchSubtree" value="true"/>
            </bean>
        </constructor-arg>
    </bean>

     

    patched-js-ldap.jar


    User Feedback

    Recommended Comments

    I had this problem and followed this instrunctions, but now I have this:

    2019-03-14 08:08:09,901 ERROR ContextLoader,localhost-startStop-2:331 - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyAuthenticationProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapAuthenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot create inner bean 'com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSADBindAuthenticator#73e81bb6' of type [com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSADBindAuthenticator] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSADBindAuthenticator] for bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSADBindAuthenticator#73e81bb6' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/providers/ldap/authenticator/AbstractLdapAuthenticator
     

    Some spring class is missing. Should I use any new spring jar?

    Link to comment
    Share on other sites

    I added this new property:

    <property name="referral" value="follow" />

    Inside:

    <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">    <constructor-arg value="ldap://myserver:389/dc=base,dc=dn"/>    <!-- manager user name and password (may not be needed)  -->    <property name="userDn" value="myuser@base.dn"/>    <property name="password" value="myP@ssword"/>    <property name="referral" value="follow" /></bean>

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...