Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
2.3.3.Final, 2.3.4.Final, 2.3.5.Final
-
None
Description
When a POST method on a subresource is inherited from a superclass and takes a generic parameter as entity, POSTs to that method result in 400. This is caused by the type of the method parameter being resolved to 'Object': Could not find message body reader for type: class java.lang.Object of content type: application/xml. The same construction does work on root resources.
A workaround for RESTEasy is to override the methods in the subclass and simply call super. Unfortunately, this workaround triggers a bug in Jersey which resolves the method twice and throws an Exception. This combination of bugs makes it impossible to use subresources with generic methods in a portable way across JBoss and Glassfish.
I've attached a small showcase of the problem. To trigger the exception, POST to http://localhost:8080/jaxrsbug/rest/identity/address.