Reputation: 73
I am using Grails 2, Groovy 1.8.5, Grails Ldap plugin to perform lookups via LDAP on Active Directory and I am getting javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'. For authorization I use Spring LDAP which works fine with no problems. I have looked around and most threads are talking about automatically following referrals which I use this flag for derefLinkFlag = true I have even tried to pass this argument to JVM -Djava.naming.referral=follow
Has anyone come across this? Any suggestions are welcomed. Do you think it is something related to how AD is set up and if yes, what should I look for, I am new to AD.
I can avoid this exception because it happens my Active Directory to be Global Catalog, so I just connect to port 3268 and everything works fine. However, there is a caveat, not all attributes are added to Global Catalog, such as physicalDeliveryOfficeName. Which is also something that can be solved by replicating/including the attribute to GC schema, but it is something I do not wish to do for a number of reasons.
The code follows: The config
ldap {
directories {
rootdir {
url = "ldap://my.company.com:389"
base = "DC=my,DC=company,DC=com"
userDn = "cn=User Name,cn=Users,dc=my,dc=company,dc=com"
password = "secret"
searchControls {
countLimit = 400
timeLimit = 6000
searchScope = "subtree"
derefLinkFlag = true
}
}
}
schemas = [
com.mycompany.ldap.User,
com.mycompany.ldap.Group
]
}
The domain
@GldapoSchemaFilter("(objectclass=person)")
class User {
@GldapoNamingAttribute
String cn
String dn
String mail
String sn
String physicalDeliveryOfficeName
}
The Controller
class UserController {
def index() {
redirect(action: "list")
}
def list(){
List users = User.findAll()
[userInstanceList: users, userInstanceTotal: users.size()]
}
}
The exception:
Unprocessed Continuation Reference(s). Stacktrace follows:
javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name '/'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2846)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:129)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:198)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:171)
at gldapo.GldapoDirectory.nonPagedSearch(GldapoDirectory.groovy:162)
at gldapo.GldapoDirectory.search(GldapoDirectory.groovy:144)
at gldapo.schema.GldapoSchemaClassInjecto$__clinit__closure35.doCall(GldapoSchemaClassInjecto.groovy:374)
at gldapo.schema.GldapoSchemaClassInjecto$__clinit__closure38.doCall(GldapoSchemaClassInjecto.groovy:390)
at uk.co.mycomp.myapp.ldap.UserController.list(UserController.groovy:15)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Many thanks, G
Upvotes: 2
Views: 9813
Reputation: 51
Naming exception javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name: This error comes where you searchbaseDN works from top level.Use ou(Organization unit) in search base dn
Upvotes: 2
Reputation: 73
The solution is to include the following line to your ldap settings in Config.groovy
ignorePartialResultExcepton = true
Upvotes: 4