2016-05-11

Spring javax.naming.PartialResultException LDAP Authentication


Reference URL: http://stackoverflow.com/questions/16412236/how-to-resolve-javax-naming-partialresultexception






Sample Errors:


stdout: 2016-05-11 18:16:22,077     INFO: _____ -  URL 'ldap://valid-server-ip-address:389/DC=company,DC=com,DC=branch_location', root DN is 'DC=company,DC=com,DC=branch_location'.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   57
stdout: 2016-05-11 18:16:22,138    DEBUG: _____ - AuthenticationSource not set - using default implementation.#####                      org.springframework.ldap.core.support.AbstractContextSource:  328
stdout: 2016-05-11 18:16:22,140    DEBUG: _____ - Using LDAP pooling..#####                      org.springframework.ldap.core.support.AbstractContextSource:  346
stdout: 2016-05-11 18:16:22,141    DEBUG: _____ - Trying provider Urls: ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location.#####                      org.springframework.ldap.core.support.AbstractContextSource:  371
stdout: 2016-05-11 18:16:23,328    DEBUG: _____ - Looking for controller advice: org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy.##### org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter:  618
stdout: 2016-05-11 18:16:23,388    DEBUG: _____ - Looking for exception mappings: org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy.##### org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver:  284
stdout: 2016-05-11 18:16:23,782    DEBUG: _____ - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@23da34b5].#####               org.springframework.context.support.ClassPathXmlApplicationContext:  858
stdout: 2016-05-11 18:16:23,784    TRACE: _____ - Publishing event in org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@376f2723: startup date [Wed May 11 18:16:15 SGT 2016]; root of context hierarchy].#####               org.springframework.context.support.ClassPathXmlApplicationContext:  332
stdout: 2016-05-11 18:16:23,842    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
stdout: 2016-05-11 18:16:23,903    DEBUG: _____ - PartialResultException encountered and ignored.#####                                       org.springframework.ldap.core.LdapTemplate:  312
javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2866)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:147)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:216)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:295)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:462)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:483)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:503)
at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1482)
at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1386)
at test.ldap.UTIL_AUTHEN.main(UTIL_AUTHEN.java:52)
stdout: 2016-05-11 18:16:23,907    DEBUG: _____ - Removing pooling flag for user cn=Administrator,cn=Users,dc=company,dc=com,dc=branch_location.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   76
stdout: 2016-05-11 18:16:23,917    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
===============================
Administrator
pa55word@2016
===============================
true
stdout: 2016-05-11 18:16:23,921    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
stdout: 2016-05-11 18:16:23,936    DEBUG: _____ - PartialResultException encountered and ignored.#####                                       org.springframework.ldap.core.LdapTemplate:  312
javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2866)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:147)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:216)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:295)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:462)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:483)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:503)
at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1482)
at org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1386)
at test.ldap.UTIL_AUTHEN.main(UTIL_AUTHEN.java:65)
stdout: 2016-05-11 18:16:23,938    DEBUG: _____ - Removing pooling flag for user cn=Staff Name,cn=Users,dc=company,dc=com,dc=branch_location.#####                com.company.spring.security.SpringSecurityContextSourceWrapper:   76
stdout: 2016-05-11 18:16:23,949    DEBUG: _____ - Got Ldap context on server 'ldap://valid-server-ip-address:389/dc=company,dc=com,dc=branch_location'.#####                      org.springframework.ldap.core.support.AbstractContextSource:  259
===============================
staff.name
pa55word*()
===============================
true







<bean id="contextSourceLdap"
class="com.customized.spring.security.SpringSecurityContextSourceWrapper">
<constructor-arg value="${LDAP.SERVER}:389/${LDAP.DOMAIN}"/>
<property name="userDn" value="${LDAP.USERDN}"/>
<property name="password" value="${LDAP.PASSWORD}"/>
</bean>





<bean id="contextSourceLdap"
class="com.customized.spring.security.SpringSecurityContextSourceWrapper">
<constructor-arg value="${LDAP.SERVER}:3268/${LDAP.DOMAIN}"/>
<property name="userDn" value="${LDAP.USERDN}"/>
<property name="password" value="${LDAP.PASSWORD}"/>
</bean>
































No comments:

Post a Comment