raffaele.milan Posted September 1, 2014 Share Posted September 1, 2014 After I have copied and renamed the file sample-applicationContext-externalAuth-LDAP.xml (renamed without prefix sample), I write the external.ldapUrl property like this :<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource"> <constructor-arg value="ldap://hostname-ldap-db:389/o=System CC,c=It"/>After restarting the Jasper Server, the error Apache Tomcat 404 occurs, are ther any problem with my base DN (o=System CC,c=I)?The users properties by query ldap are : ou=users,o=System CC,c=ItThank you for your help in advance Link to comment Share on other sites More sharing options...
raffaele.milan Posted September 2, 2014 Author Share Posted September 2, 2014 Hy All,In the catalina.out I've found this error:2014-09-02 09:17:14,931 ERROR ContextLoader,localhost-startStop-1:307 - Context initialization failedorg.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 'org.springframework.security.providers.ldap.authenticator.BindAuthenticator#17c916d' of type [org.springframework.security.providers.ldap.authenticator.BindAuthenticator] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.providers.ldap.authenticator.BindAuthenticator#17c916d' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapContextSource' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapContextSource' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Root DNs must be the same when using multiple URLsI hope can be help for the solutionRegards Link to comment Share on other sites More sharing options...
thomas.jankowski Posted October 14, 2014 Share Posted October 14, 2014 Comment deleted an added as answer. Link to comment Share on other sites More sharing options...
thomas.jankowski Posted October 14, 2014 Share Posted October 14, 2014 I had the same problem. I found the solution in this post: https://communities.coverity.com/thread/1947 .You must replace the blanks in the DN of the URL of the ldap-server in the bean "ldapContextSource" in your applicationContext-externalAuth-LDAP.xml. So it looks like this: <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource"> <constructor-arg value="ldap://<server>:389/dc=<example>,dc=de"/> <property name="userDn" value="cn=<user>,ou=<usergroup>,dc=<example>,dc=de"/> <property name="password" value="<password>"/> </bean> I hope this helps you. Link to comment Share on other sites More sharing options...
sajith.gunarathna Posted December 8, 2014 Share Posted December 8, 2014 Hi, I had the same problem,But I configured it.There's a simple solution.change the bean class to default class.change <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">to<bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">Tell me If you need more assistance. Regards,Chinthaka. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now