首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpenIDM -脚本的Groovy连接器提供程序

OpenIDM -脚本的Groovy连接器提供程序
EN

Stack Overflow用户
提问于 2015-03-30 11:40:28
回答 1查看 1K关注 0票数 0

我试图使用 groovy 连接器(而不是REST/CREST连接器)为Groovy连接器生成提供程序配置。

当我向CreateFullConfig REST服务 (/openidm/system?_action=createFullConfig)发送以下配置时,我发出500个内部服务器错误。

{“名称”:"scriptedGroovy","connectorRef":{ "bundleName":"bundleVersion":"1.4.1.0","connectorName":"org.forgerock.openicf.connectors.groovy.ScriptedConnector“},"configurationProperties":{ "authenticateScriptFileName":"AuthenticateScript.groovy","warningLevel":1,"minimumRecompilationInterval":100,"deleteScriptFileName":"DeleteScript.groovy","schemaScriptFileName":"SchemaScript.groovy","scriptRoots":null,"customizerScriptFileName":null,"resolveUsernameScriptFileName":null,"customConfiguration":null,"debug":false,"targetDirectory":null,"disabledGlobalASTTransformations":null,"classpath":“path/连接器/tools”,"scriptExtensions":"groovy“,"testScriptFileName":"TestScript.groovy","customSensitiveConfiguration":null,"updateScriptFileName":"UpdateScript.groovy","sourceEncoding":"UTF-8","searchScriptFileName":"SearchScript.groovy","scriptOnResourceScriptFileName":空,"scriptBaseClass":空,“详细”:false,"createScriptFileName":"CreateScript.groovy","recompileGroovySource":false,“false”:10,"syncScriptFileName":"SyncScript.groovy“},"operationTimeout":{”创建“:-1,“更新”:-1、“删除”:-1、“测试”:-1、"SCRIPT_ON_CONNECTOR":-1、"SCRIPT_ON_RESOURCE":-1、"GET":-1、"RESOLVEUSERNAME":-1、“身份验证”:-1、“搜索”:-1、“验证”:-1、“同步”:-1、“模式”:-1 },"resultsHandlerConfig":{ "enableNormalizingResultsHandler":true,"enableFilteredResultsHandler":true,"enableCaseInsensitiveFilter":false,"enableAttributesToGetSearchResultsHandler":true },"poolConfigOption":{ "maxObjects":10,"maxIdle":10,"maxWait":150000,"minEvictableIdleTimeMillis":120000,"minIdle":1 },"configurationProperties":{ "xsdIcfFilePath“:”samples/data/resource-schema-1.xsd“,"xsdFilePath“:xsdFilePath "xmlFilePath”:“xmlFilePath/sample1 1/data/xmlConnectorData.xml”,"createFileIfNotExists":false }

它会导致以下堆栈跟踪:

警告:资源异常:500个内部服务器错误:“内部服务器错误”org.forgerock.json.resource.InternalServerErrorException:org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:52) handleAction(FilterChain.java:57) 致因: sun.reflect.GeneratedConstructorAccessor131.newInstance(Unknown源的java.lang.UnsupportedOperationException )在java.lang.reflect.Constructor.newInstance(Constructor.java:526)的sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

我认为配置不完全正确,但我不知道在哪里.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-03-30 17:13:54

我只是使用这个文件生成了正确的配置:

代码语言:javascript
复制
    {
    "enabled" : true,
    "syncFailureHandler" : {
        "postRetryAction" : "logged-ignore",
        "maxRetries" : 5
    },
    "configurationProperties" : {
        "minimumRecompilationInterval" : 100,
        "scriptRoots" : [
            "tbd/tbd/tools"
        ],
        "customizerScriptFileName" : "CustomizerScript.groovy",
        "resolveUsernameScriptFileName" : "ResolveUsernameScript.groovy",
        "debug" : false,
        "disabledGlobalASTTransformations" : [
            null
        ],
        "scriptExtensions" : [
            "groovy"
        ],
        "updateScriptFileName" : "UpdateScript.groovy",
        "sourceEncoding" : "UTF-8",
        "searchScriptFileName" : "SearchScript.groovy",
        "scriptOnResourceScriptFileName" : "ScriptOnResourceScript.groovy",
        "scriptBaseClass" : null,
        "verbose" : false,
        "createScriptFileName" : "CreateScript.groovy",
        "tolerance" : 10,
        "readSchema" : false,
        "authenticateScriptFileName" : "AuthenticateScript.groovy",
        "warningLevel" : 1,
        "deleteScriptFileName" : "DeleteScript.groovy",
        "schemaScriptFileName" : "SchemaScript.groovy",
        "customConfiguration" : null,
        "targetDirectory" : null,
        "classpath" : "tbd/tbd/tools",
        "customSensitiveConfiguration" : null,
        "testScriptFileName" : "TestScript.groovy",
        "recompileGroovySource" : false,
        "syncScriptFileName" : "SyncScript.groovy"
    },
    "_id" : "provisioner.openicf/MYCONNECTOR",
    "objectTypes" : {
        "__ACCOUNT__" : {
            "id" : "__ACCOUNT__",
            "properties" : {
                "lastModified" : {
                    "nativeName" : "lastModified",
                    "flags" : [
                        "NOT_CREATABLE",
                        "NOT_UPDATEABLE"
                    ],
                    "type" : "string",
                    "nativeType" : "string"
                },
                "created" : {
                    "nativeName" : "created",
                    "flags" : [
                        "NOT_CREATABLE",
                        "NOT_UPDATEABLE"
                    ],
                    "type" : "string",
                    "nativeType" : "string"
                },
                "telephoneNumber" : {
                    "type" : "string",
                    "nativeName" : "telephoneNumber",
                    "nativeType" : "string"
                },
                "familyName" : {
                    "type" : "string",
                    "required" : true,
                    "nativeName" : "familyName",
                    "nativeType" : "string"
                },
                "__NAME__" : {
                    "nativeName" : "__NAME__",
                    "flags" : [
                        "NOT_UPDATEABLE"
                    ],
                    "type" : "string",
                    "required" : true,
                    "nativeType" : "string"
                },
                "userName" : {
                    "nativeName" : "userName",
                    "flags" : [
                        "NOT_CREATABLE",
                        "NOT_UPDATEABLE"
                    ],
                    "type" : "string",
                    "nativeType" : "string"
                },
                "emailAddress" : {
                    "type" : "string",
                    "nativeName" : "emailAddress",
                    "nativeType" : "string"
                },
                "givenName" : {
                    "type" : "string",
                    "nativeName" : "givenName",
                    "nativeType" : "string"
                },
                "displayName" : {
                    "type" : "string",
                    "required" : true,
                    "nativeName" : "displayName",
                    "nativeType" : "string"
                },
                "password" : {
                    "nativeName" : "password",
                    "flags" : [
                        "NOT_UPDATEABLE",
                        "NOT_READABLE",
                        "NOT_RETURNED_BY_DEFAULT"
                    ],
                    "type" : "string",
                    "nativeType" : "string"
                },
                "groups" : {
                    "type" : "array",
                    "nativeName" : "groups",
                    "items" : {
                        "type" : "string",
                        "nativeType" : "string"
                    },
                    "nativeType" : "string"
                }
            },
            "type" : "object",
            "$schema" : "http://json-schema.org/draft-03/schema",
            "nativeType" : "__ACCOUNT__"
        }
    },
    "poolConfigOption" : {
        "maxWait" : 150000,
        "minIdle" : 1,
        "maxIdle" : 10,
        "minEvictableIdleTimeMillis" : 120000,
        "maxObjects" : 10
    },
    "name" : "TBD",
    "connectorRef" : {
        "connectorHostRef" : "#LOCAL",
        "connectorName" : "org.forgerock.openicf.connectors.groovy.ScriptedConnector",
        "bundleName" : "org.forgerock.openicf.connectors.groovy-connector",
        "displayName" : "Groovy Connector",
        "bundleVersion" : "1.4.1.0"
    },
    "operationTimeout" : {
        "TEST" : -1,
        "UPDATE" : -1,
        "CREATE" : -1,
        "SCRIPT_ON_RESOURCE" : -1,
        "GET" : -1,
        "AUTHENTICATE" : -1,
        "SEARCH" : -1,
        "SCHEMA" : -1,
        "DELETE" : -1,
        "SYNC" : -1,
        "RESOLVEUSERNAME" : -1,
        "VALIDATE" : -1,
        "SCRIPT_ON_CONNECTOR" : -1
    },
    "resultsHandlerConfig" : {
        "enableAttributesToGetSearchResultsHandler" : true,
        "enableCaseInsensitiveFilter" : false,
        "enableFilteredResultsHandler" : true,
        "enableNormalizingResultsHandler" : true
    }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29345292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档