Skip to content
Advertisement

Class not found com.sun.ws.rs.ext.RuntimeDelegateImpl on ubuntu tomcat

I’m using GWT/P to build a webapp which uses javax.ws.rs.client to communicate with rest services.

Jersey client is used:

JavaScript

It’s deployed on tomcat (7 and 9 versions, both work as expected). However, on one ubuntu server, using tomcat 9 I get following exception:

JavaScript

I don’t know why is it looking for com.sun.ws.rs.ext.RuntimeDelegateImpl instead of org.glassfish.jersey.internal.RuntimeDelegateImpl, and that it happens only on that particular server (windows, amazon AWS linux, docker linux works fine).

I have tried increasing jersey version to 2.27 (can’t increase it more, since newer versions conflict with GWT jetty 9.2.14).

I have tried adding META-INF/services/javax.ws.rs.ext.RuntimeDelegate with first line as org.glassfish.jersey.internal.RuntimeDelegateImpl.

Nothing seems to work. What am I missing here? Any ideas?

Advertisement

Answer

gwt-rest-dispatch was including jsr311-api.jar, which was causing the issues. Removing this dependency (since my project does not use it) solved this.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement