The following questions discusses the theory of the dependencies between Jersey and the JAX-RS specification:
I was assuming that I could add the dependency:
<!-- javax.ws.rs.core e.g. Request -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.0</version>
</dependency>
to my API defining maven project and use Jersey/Grizzly for the implementation.
<jersey.version>1.15</jersey.version>
<grizzly.version>2.2.20</grizzly.version>
Contrary to this assumption I got the following error message:
15.02.2013 08:41:25 org.glassfish.grizzly.http.server.HttpServerFilter handleRead
WARNUNG: Unexpected error
java.lang.IncompatibleClassChangeError: Class javax.ws.rs.core.Response$Status does not implement the requested interface javax.ws.rs.core.Response$StatusType
at com.sun.jersey.spi.container.ContainerResponse.getStatus(ContainerResponse.java:571)
What is the correct JAX-RS API dependency that should be used with Jersey 1.15?
I'd like to do it in a way that the implementation could be replaced by any other JAX-RS compliant library.