Details
Description
Creating a new entry in ldap creates the following exception:
Exception Message: No signature of method: groovy.util.ConfigObject.createEntry() is applicable for argument types: (org.springframework.ldap.core.DistinguishedName, javax.naming.directory.BasicAttributes) values: {uid=foo.bar, ou=Users, {objectClass=objectClass: fooAccount, cn=cn: foo}}
Caused by: groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.createEntry() is applicable for argument types: (org.springframework.ldap.core.DistinguishedName, javax.naming.directory.BasicAttributes) values: {uid=foo.bar, ou=Users, {objectClass=objectClass: fooAccount, cn=cn: foo}}
Class: GldapoSchemaClassInjecto
At Line: [248]
I used the following config:
ldap {
directories {
fooDirectory {
url = "ldap://foo.de"
base = "o=foo,c=de"
userDn = "cn=manager,o=otop,c=de"
password = "mojo"
searchControls {
timeLimit = 600
searchScope = "subtree"
}
}
}
schemas = [ FooAccountLDAP, FooGroupLDAP ]
typemappings = [ de.foo.MyTypeMappings ]
}
As workaround omit setting the directory while setting attributes. then the default directory (if you only have one) is used and it works fine.
def newUser = new MySchemaClass()
// Assign the object a directory and a place in it.
//newUser.directory = "example" <-- coment this line
newUser.parent = "ou=people"
newUser.uid = "newuser"
// Set the attribute values
newUser.cn = "New"
newUser.sn = "User"
// Write to the directory
newUser.create()
Issue Links
- relates to
-
GLDP-111
Setting a directory by name doesn't work
-