The following questions discuss the dependency theory between Jersey and the JAX-RS specification:
I assumed I could add a dependency:
<dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.0</version> </dependency>
for my maven project defining API and use jersey / grizzly for implementation.
<jersey.version>1.15</jersey.version> <grizzly.version>2.2.20</grizzly.version>
In contrast to this assumption, I received 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 to be used with Jersey 1.15?
I would like to do this so that the implementation can be replaced with any other JAX-RS compatible library.
source share