-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Here's my exception with some debug output.
[DEBUG] RESTCtrlForAnIndividualsActivitiesTest - method: createActivity [@javax.ws.rs.PUT(), @javax.ws.rs.Path(value={activity})]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.627 sec <<< FAILURE! - in com.lm.activity.RESTCtrlForAnIndividualsActivitiesTest
testCreateActivity(com.lm.activity.RESTCtrlForAnIndividualsActivitiesTest) Time elapsed: 0.129 sec <<< ERROR!
java.lang.IllegalArgumentException: No @Path annotated method for com.lm.activity.RESTCtrlForAnIndividualsActivities.createActivity
at org.jboss.resteasy.specimpl.ResteasyUriBuilder.path(ResteasyUriBuilder.java:394)
at javax.ws.rs.core.UriBuilder.fromMethod(UriBuilder.java:182)
at com.lm.activity.RESTCtrlForAnIndividualsActivitiesTest.testCreateActivity(RESTCtrlForAnIndividualsActivitiesTest.java:47)
and the calling code that causes the exception
URI uri
= UriBuilder
.fromMethod( resourceClass, "createActivity" )
.build( randomUUID(), randomUUID() );
Here's the code that generates the debug output
Arrays.asList( resourceClass.getDeclaredMethods() )
.parallelStream().forEach( method -> log.debug( "method: {} {}", method.getName(), Arrays.toString( method.getDeclaredAnnotations() ) ) );
and here's the method definition.
@PUT @Path( "{activity}" ) Response createActivity( @Context UriInfo uri, @PathParam( "individual" ) IndividualBuilder ib, @PathParam( "activity" ) UUID activityId, Activity activity ) {
It's possible that I'm wrong that it works like this