[
https://issues.jboss.org/browse/WFLY-2724?page=com.atlassian.jira.plugin....
]
Philipp Plogmann updated WFLY-2724:
-----------------------------------
Summary: IllegalArgumentException in JAX-RS caused by MethodValidation (was:
JAX-RS method validation fails with generic interface)
Description:
If a JaxRS service implements an interface the calls to this method fail with an
IllegalArgumentException:
java.lang.IllegalArgumentException: HV000162: The validated type
de.pap.wildflyresttest.TestRestResource$Proxy$_$$_WeldClientProxy does not specify the
constructor/method: public de.pap.wildflyresttest.Test
de.pap.wildflyresttest.TestRestResource.get(java.lang.Long)
The same resource class without the interface works without a problem.
Example code:
{quote}
public interface RestResource<T, K> {
T get(K id);
}
@Path("test")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class TestRestResource implements RestResource<Test, Long> {
public TestRestResource() {
}
@GET
@Path("{id}")
@Override
public Test get(@PathParam("id") Long id) {
return new Test();
}
}
{quote}
Affects: Compatibility/Configuration
IllegalArgumentException in JAX-RS caused by MethodValidation
-------------------------------------------------------------
Key: WFLY-2724
URL:
https://issues.jboss.org/browse/WFLY-2724
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: REST
Affects Versions: 8.0.0.CR1
Reporter: Philipp Plogmann
Assignee: Stuart Douglas
If a JaxRS service implements an interface the calls to this method fail with an
IllegalArgumentException:
java.lang.IllegalArgumentException: HV000162: The validated type
de.pap.wildflyresttest.TestRestResource$Proxy$_$$_WeldClientProxy does not specify the
constructor/method: public de.pap.wildflyresttest.Test
de.pap.wildflyresttest.TestRestResource.get(java.lang.Long)
The same resource class without the interface works without a problem.
Example code:
{quote}
public interface RestResource<T, K> {
T get(K id);
}
@Path("test")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class TestRestResource implements RestResource<Test, Long> {
public TestRestResource() {
}
@GET
@Path("{id}")
@Override
public Test get(@PathParam("id") Long id) {
return new Test();
}
}
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira