After some hours of searching and testing, I found the solution and want to share it with you, so you may get the answer faster.
I have a REST API method:
@POST
@AnonymousAllowed // check permissions separately (see below)
@Path("import")
@RequestType(value = List.class, genericTypes = {ManageBranchesRestProject.class})
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
public Response importIssueBranches(@DefaultValue("[]") final List<ManageBranchesRestIssue> lstIssues)
{
....
....
}
This lead to the following exception:
[INFO] [talledLocalContainer] 2017-05-23 15:30:18,045 http-nio-2990-exec-7 ERROR admin 930x306x1 3x3yoa 0:0:0:0:0:0:0:1 /rest/branches/1.0/branches/BIB/all [c.a.plugin.servlet.DefaultServletModuleManager] Unable to create new reference LazyLoadedFilterReference{descriptor=com.besi.jira.plugins.customfield-fixbranches:manage-branches-rest-filter (Branches REST API), filterConfig=com.atlassian.plugin.servlet.filter.PluginFilterConfig@5581d22e}
[INFO] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference$InitializationException: com.sun.jersey.spi.inject.Errors$ErrorMessagesException
[INFO] [talledLocalContainer] at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
[INFO] [talledLocalContainer] at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.DefaultServletModuleManager.getInstance(DefaultServletModuleManager.java:447)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.DefaultServletModuleManager.getFilter(DefaultServletModuleManager.java:440)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.DefaultServletModuleManager.getFilters(DefaultServletModuleManager.java:300)
[INFO] [talledLocalContainer] at com.atlassian.plugins.rest.module.servlet.DefaultRestServletModuleManager.getFilters(DefaultRestServletModuleManager.java:121)
There was a typo (classical copy&paste mistake) in it: ManageBranchesRestProject.class should be named ManageBranchesRestIssue.class.
But because of this exception I had to search for a long time until I found the cause.
Maybe this helps.