通过SCIM REST API在WSO2中创建用户时出现异常

时间:2014-08-06 12:28:03

标签: wso2 wso2carbon scim

在尝试通过SCIM创建用户时,我一直收到此异常:

Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
    at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:1016)
    at org.wso2.charon.core.protocol.endpoints.AbstractResourceEndpoint.getDecoder(AbstractResourceEndpoint.java:84)
    at org.wso2.charon.core.protocol.endpoints.UserResourceEndpoint.create(UserResourceEndpoint.java:138)
    at org.wso2.carbon.identity.scim.provider.resources.UserResource.createUser(UserResource.java:145)
    at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)

我正在使用JDBC商店经理,我的请求详情如下:

网址:/ wso2 / scim /用户
有效载荷:

   {"wso2Extension":
    {
      "dateOfBirth":"17/01/1982",
      "secQuestion":"What was your childhood nickname?",
      "lastName":"Chandra",
      "mail":"ram.chandra@yopmail.com",
      "phoneNumber":"1111111111",
      "secAnswer":"nickname",
      "ssn":"123456789",
      "firstName":"Ram",
      "prefMethComm":"email",
      "preferredLanguage":"en-US"},
 "schemas":[""],
 "userName":"ram.chandra@yopmail.com",
 "password":"somepassword"
}

来自SCIM的REST响应:

    {
    "Errors": [
        {
            "description": "Error in adding the user: ram.chandra@yopmail.com to the user store..",
            "code": "500"
        }
    ]
}

任何有关调试此问题的指示都将不胜感激。

1 个答案:

答案 0 :(得分:1)

原来,preferredLanguage的SCIM声明配置不正确。 WSO2应该为这些问题提供更具体的例外。