Tomcat Jersey SPI Error

1.1k views Asked by At

I have a Jersey (1.4) app deployed on Tomcat 5.5, when Tomcat starts up I can see its loading all the resources and providers. But as soon as I access any of the web services I get this strange error

java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure

I spent good long time finding out what's going on but had no luck.

I converted maven project into eclipse project using mvn eclipse:eclipse -Dwtpversion=1.5.

Any ideas?

1

There are 1 answers

0
Bohemian On

I got this error when I also had a nuxeo related dependancy in my maven pom.xml, which itself has a dependency on jersey libraries, but at an earlier version (1.1.5 to be specific).

I changed the pom to depend on the latest version of jersey-core, jersey-server and jersey-client dependencies and ran mvn eclipse:eclipse and the problem went away!

There must have been a class clash involved.