Hello all,
I'm trying to build a Grails application which can do LDAP lookups. I've been following a few guides (link text and some others) but to no end I'm afraid.
Relevant source code: From config.groovy:
ldap {
directories {
dir1 {
url = "ldap://dc01"
base = "ou=someou,dc=check,dc=nl"
userDn = "cn=Administrator,cn=Users,dc=check,dc=nl"
password = "wowthisisnothepassword"
}
}
schemas = [
ldapclient.GldapoSchemaClassForUser
]}
My domainclass:
package ldapclient
import gldapo.schema.annotation.GldapoNamingAttribute
import gldapo.schema.annotation.GldapoSynonymFor
import gldapo.schema.annotation.GldapoSchemaFilter
@GldapoSchemaFilter("(objectclass=person)")
class GldapoSchemaClassForUser {
@GldapoNamingAttribute
String uid
@GldapoSynonymFor("cn")
String name
@GldapoSynonymFor("mail")
String email
@GldapoSynonymFor("uid")
String username
@GldapoSynonymFor("fullname")
String fullName
}
And my controller:
package ldapclient
class AdController {
def defaultAction = "list"
List matches = GldapoSchemaClassForUser.findAll(
filter: "(name=s*)"
)
def list = {
[ "adMatches" : matches.list() ]
}}
Although my program conforms (for as far as I can tell) to what should work according to the many documents, I cannot run this. The error thrown:
Caused by: groovy.lang.MissingMethodException: No signature of method: static ldapclient.GldapoSchemaClassForUser.findAll() is applicable for argument types: (java.util.LinkedHashMap) values: [[filter:(name=s)]] at ldapclient.AdController.(AdController.groovy:6)*
Any clues what's going on / wrong? I'm on Grails 1.2.3 and using the most current version of the LDAP plugin. The project is clean (freshly created).
Thanks in advance!