We are having a strange issue while using Acegi version 1.0.1's LDAP code where it is sometimes giving us a "javax.naming.PartialResultException: null " error on line 251 in LdapTemplate while searching for a user. I can remove the results.hasMore() check and we get a little further but then get a Communication Timeout.
The strange thing is that this is sporadic, it will work for a while and then stop working .
I am pretty sure the underling problem is a network issue, however we do have legacy LDAP code that does not have this problem. I have created a simple test case that runs the legacy LDAP code and Acegi's LDAP code. The legacy LDAP code never gets this error, while the Acegi code gets it sometimes.
Before I go and refactor our app to use the old LDAP code, is there any ideas about how I can resolve this? Am I doing something completely stupid?
Thanks for any thoughts..
--Tyler
<bean id="initialDirContextFactory"
class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
<constructor-arg
value="ldap://x.x.x.x:389/DC=xxx,DC=xx,DC=xx,DC=xx,DC=gov" />
<property name="managerDn" value="CN=BLAHBLAH,OU=xxxx,OU=Groups Role-Based,DC=xxx,DC=xx,DC=xx,DC=xx,DC=gov" />
<property name="managerPassword" value="xxxxxxxxx" />
<property name="extraEnvVars">
<map>
<entry>
<key>
<value>java.naming.referral</value>
</key>
<value>follow</value>
</entry>
</map>
</property>
</bean>
<bean id="userSearch"
class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg value="" />
<constructor-arg value="(sAMAccountName={0})" />
<constructor-arg ref="initialDirContextFactory" />
<property name="searchSubtree" value="true" />
</bean>
<bean id="ldapAuthenticationProvider"
class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
<constructor-arg>
<bean
class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
<constructor-arg ref="initialDirContextFactory" />
<property name="userSearch" ref="userSearch" />
</bean>
</constructor-arg>
<constructor-arg>
<bean
class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator ">
<constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
<constructor-arg><value></value></constructor-arg>
<property name="groupSearchFilter"><value>uid={0},ou=users</value></property>
<property name="convertToUpperCase" value="true" />
<property name="rolePrefix" value="" />
</bean>
</constructor-arg>
</bean>
<bean id="ldapUserDetailsMapper" class=" org.acegisecurity.userdetails.ldap.LdapUserDetailsMapper">
<property name="passwordAttributeName" value="userpassword"/>
<property name="convertToUpperCase" value="true"/>
<property name="rolePrefix" value=""/>
<property name="roleAttributes">
<list>
<value>memberOf</value>
</list>
</property>
</bean>
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Home: http://acegisecurity.org Acegisecurity-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
