org.glassfish.jersey.internal.RuntimeDelegateImpl NOT FOUND

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-common</artifactId>
    <version>2.26</version>
    <scope>test</scope>
</dependency>

I ran into issues with Java 8 and jersey-common 2.22.2 but 2.26 worked.


Developing against a Wildfly 10.1 runtime I didn't want to introduce Jersey into my builds. With Gradle I used

testRuntime "org.jboss.resteasy:resteasy-jaxrs:$versions.resteasy"

resteasy version is 3.0.19.Final. This jar contains

META-INF/services/javax.ws.rs.ext.RuntimeDelegate

with an entry

org.jboss.resteasy.spi.ResteasyProviderFactory

In my case the problem was for another Jar being used named: javax.ws.rs-api-2.0.jar

Removing that jar solved my problem.

The jar that I have used:

<include name="jersey-client-1.9.jar" />
<include name="jersey-core-1.9.jar" />
<include name="jersey-multipart-1.9.jar" />

If you're using Maven, use the following dependency:

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-common</artifactId>
    <version>2.22.2</version>
    <scope>test</scope>
</dependency>

For Gradle, the following will work:

testImplementation 'org.glassfish.jersey.core:jersey-common:2.22.2'