users@jersey.java.net

Re: [Jersey] Jersey + Spring Problem

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 21 Jan 2010 16:20:54 +0000

Hi John,

We moved the jersey-spring artifact to the contribs area:

   http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-spring/

For all Jersey components you need to use the same version. The
dependencies section of the users guide is the definitive place to look:

   https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html
#d4e1280

Hth,
Paul.

On Jan 21, 2010, at 4:15 PM, JohnM_Gallagher_at_timeinc.com wrote:

> We are developing an application for which we would like to
> integrate Jersey and Spring. It seems that the only jar files that
> work together are jersey-core-1.0, jersey-server-1.0, and jersey-
> spring-1.0. We have tried to get the 1.0.3.1, 1.1.4.1, and 1.1.5
> core and server jar files to work with jersey-spring-1.0, but we are
> getting this exception when we start our application in tomcat 5.5.27:
>
> ERROR 2010-01-21 11:04:01,049
> org.apache.catalina.core.StandardContext.loadOnSta
> rtup(StandardContext.java:3958) - Servlet /webservices threw load()
> exception
> java.lang.NoClassDefFoundError: com/sun/jersey/spi/service/
> ComponentProvider
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:
> 2357)
> at java.lang.Class.getConstructor0(Class.java:2671)
> at java.lang.Class.newInstance0(Class.java:321)
> at java.lang.Class.newInstance(Class.java:303)
> at
> org
> .apache
> .catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089)
> at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
> 966)
> at
> org
> .apache
> .catalina.core.StandardContext.loadOnStartup(StandardContext.java:
> 3956)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 4230)
> at
> org
> .apache
> .catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
> 740)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
> at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
> at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
> at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
> at
> org
> .apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
> 311)
> at
> org
> .apache
> .catalina
> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:
> 448)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:
> 552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
> 433)
>
> Is there a newer version of jersey-spring somewhere? We could not
> find any newer versions on Sun’s maven site. How can we solve this
> problem? Thank you.