AnsweredAssumed Answered

Custom REST API thows an error - Could not find acceptable representation

Question asked by vsangal on Dec 12, 2017


I am following this link to test a custom REST API Custom REST endpoints | Alfresco Documentation 

I created both REST and enterprise version

However, once created and installed in local environment environment I get following error for both calls


Call to http://localhost:8080/activiti-app/app/rest/my-rest-endpoint 




Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Mon Dec 11 15:59:31 PST 2017
There was an unexpected error (type=Not Acceptable, status=406).
Could not find acceptable representation
And Call to http://localhost:8080/activiti-app/api/enterprise/my-api-endpoint 
{"message":"Internal server error","exception":"Could not find acceptable representation"}

The code is exactly the same as shown in the link .. with added getter method