LDAP ルックアップを実行できる Grails アプリケーションを構築しようとしています。私はいくつかのガイド(リンクテキストと他のいくつか)に従ってきましたが、私は恐れています。
関連するソース コード: 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
]}
私のドメインクラス:
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
}
そして私のコントローラー:
package ldapclient
class AdController {
def defaultAction = "list"
List matches = GldapoSchemaClassForUser.findAll(
filter: "(name=s*)"
)
def list = {
[ "adMatches" : matches.list() ]
}}
私のプログラムは (私が知る限り) 多くのドキュメントに従って動作するはずですが、これを実行することはできません。スローされたエラー:
原因: groovy.lang.MissingMethodException: メソッドのシグネチャがありません: static ldapclient.GldapoSchemaClassForUser.findAll() は引数の型に適用されます: (java.util.LinkedHashMap) 値: [[filter:(name=s )]] ldapclient で.AdController.(AdController.groovy:6)*
何が起こっている/間違っているかの手がかりはありますか? 私は Grails 1.2.3 を使用しており、最新バージョンの LDAP プラグインを使用しています。プロジェクトはクリーンです (新しく作成されました)。
前もって感謝します!
返信ありがとうございます。Grails 1.3.4 にアップグレードし、いくつかのファイルを移動しました。これはうまくいきましたが、それでもこの厄介なエラーが発生します。
Error creating bean with name 'ldapclient.AdController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [ldapclient.AdController]: Constructor threw exception; nested exception is groovy.lang.MissingMethodException: No signature of method: static ldapclient.GldapoSchemaClassForUser.findAll() is applicable for argument types: (java.util.LinkedHashMap) values: [[directory:dir1, filter:(uid=myname,ou=st,ou=ouou,dc=dc,dc=dcdc)]] Possible solutions: findAll(groovy.lang.Closure), find(groovy.lang.Closure)