-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b126)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b67, mixed mode)<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.6.Final</version>
<scope>test</scope>
</dependency>
</dependencies>java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b126) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b67, mixed mode) <dependencies> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-7.0</artifactId> <version>1.0.0.Final</version> <type>pom</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-arquillian-container-managed</artifactId> <version>8.0.0.Final</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-client</artifactId> <version>3.0.6.Final</version> <scope>test</scope> </dependency> </dependencies>
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