Dear Community members,
I am encountering the following issue when try to update a project attribute using the REST API. I am using the end point "/attributeValues" and a most method.
I am passing the following body which - to me at least - seems correctly formatted and correspond to the example provided in the REST API documentation:
[
{
"value": true,
"attribute": {
"id": 1178,
"name": "EPO_Project_Formatted",
"displayName": "Formatted",
"resourceType": "PROJECT",
"type": "BOOLEAN"
},
"resource": { "id": 2094 }
}
]
After the Post is sent, I receive a response saying that method ran to completion but returned the following error:
{
"errors": [
{
"code": 500,
"type": "SERVER",
"message": "java.lang.NullPointerException"
}
]
}
When I check in the system log of the application, I can see that the following messages:
[2017-02-21 19:03:15,347] INFO http-apr-443-exec-8 com.sdl.lt.worldserver.service.permission.PermissionStageRouter: Checking permission for PermissionKey[resourceType=ATTRIBUTE_VALUE,permissionType=WRITE,auxPermission=CHANGE_PROJECT_ATTRIBUTES] [CHANGE_PROJECT_ATTRIBUTES] |
[2017-02-21 19:03:15,353] INFO http-apr-443-exec-8 com.sdl.lt.worldserver.service.permission.PermissionStageRouter: Checking permission for PermissionKey[resourceType=<null>,permissionType=NONE,auxPermission=<null>] [] |
[2017-02-21 19:03:15,359] INFO http-apr-443-exec-8 com.sdl.lt.worldserver.service.permission.PermissionStageRouter: Checking permission for PermissionKey[resourceType=<null>,permissionType=NONE,auxPermission=<null>] [] |
[2017-02-21 19:03:15,392] ERROR http-apr-443-exec-8 com.sdl.lt.worldserver.api.rest.error.ExceptionControllerAdvice: Exception intercepted: java.lang.NullPointerException |
Any idea why this is not working? Why is the resourceType "null" in the checking
Thanks in advance for your support.
Regards,
Laurent