I have a problem with
getContext(userDN,password)
method when I pass the valid userDn and password also it shows some error like the implementation is not supported.
I have used the context.xml like this:
<bean id="contextSource" class="org.springframework.ldap.pool.factory.Pooli ngContextSource">
<property name="contextSource" ref="contextSourceTarget" />
</bean>
<bean id="contextSourceTarget" class="org.springframework.ldap.core.support.LdapC ontextSource">
<property name="url" value="url" />
<property name="base" value="dc=xxx,dc=com" />
<property name="userDn" value="uid=bind,ou=System,dc=xxx,dc=com" />
<property name="password" value="bind" />
<property name="pooled" value="true"></property>
</bean>
<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
<constructor-arg ref="contextSource" />
</bean>
<bean id="springLDAPService" class="com.service.serviceimpl" depends-on="ldapConstants">
<property name="ldapTemplate" ref="ldapTemplate" />
<property name="contextSource" ref="contextSource"></property>
<property name="userValidationContextSource" ref="userValidationContextSource" />
</bean>
After this, the context source I am injecting in the serviceimpl class and calling the method like
ctx=contextSource.getContext(userDn, password);
When I use the contextSource of PoolingContextSource it is throwing exception
but when I use the
LDAPContextSource
it is executing but the problem is the
LdapUtils.closeContext(ctx);
is not working means context object is not closing in this like the above one
Any help will be appreciated. Please help, it is very urgent.