[jboss-jira] [JBoss JIRA] (WFLY-2724) IllegalArgumentException in JAX-RS caused by MethodValidation

Philipp Plogmann (JIRA) issues at jboss.org
Wed Jan 8 05:45:33 EST 2014


     [ https://issues.jboss.org/browse/WFLY-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philipp Plogmann updated WFLY-2724:
-----------------------------------

    Attachment: WildflyRestTest.zip


Maven project for the sample application.
                
> 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
>         Attachments: WildflyRestTest.war, WildflyRestTest.zip
>
>
> 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


More information about the jboss-jira mailing list