users@jersey.java.net

Re: [Jersey] jersey not mapping requests

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 09 Mar 2009 14:31:19 +0100

Hi,

For the jersey-spring-1.0.2 you need to use version 1.0.2 of the other
jersey modules, you are using an earlier version. The WebConfig class
is only present in 1.0.2 and is not in earlier versions, hence the
ClassNotFoundException.

See the dependencies document that describes what you require:

   https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/jersey/dependencies.html

Paul.

On Mar 4, 2009, at 4:35 PM, ian2008ca wrote:

>
> Hi Paul
>
> I am using jersy-sping-1.0.2, I get error when I start my server,
> Could you
> help me? thanks
>
>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>classpath:applicationContext.xml</param-value>
> </context-param>
>
> <listener>
>
> <listener-
> class>org.springframework.web.context.ContextLoaderListener</
> listener-class>
> </listener>
> <servlet>
> <servlet-name>Jersey Web Application</servlet-name>
>
> <servlet-
> class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</
> servlet-class>
> <init-param>
> <param-name>com.sun.jersey.config.feature.Redirect</param-
> name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
>
> <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-
> name>
> <param-value>true</param-value>
> </init-param>
> <!--
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</
> param-name>
>
> <param-value>com.sun.jersey.samples.bookstore.resources</param-value>
> </init-param>
> -->
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>Jersey Web Application</servlet-name>
> <url-pattern>/</url-pattern>
> </servlet-mapping>
>
>
>
>
> 11:34:44.640] {resin-30} java.lang.ClassNotFoundException:
> com.sun.jersey.spi.container.servlet.WebConfig in
> EnvironmentClassLoader[web-app:http://localhost:8000/SpringJson]
> [11:34:44.640] {resin-30} at
> com
> .caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:
> 1224)
> [11:34:44.640] {resin-30} at
> com
> .caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:
> 1203)
> [11:34:44.640] {resin-30} at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> [11:34:44.640] {resin-30} at
> java.lang.Class.getDeclaredMethods0(Native
> Method)
> [11:34:44.640] {resin-30} at
> java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
> [11:34:44.640] {resin-30} at
> java.lang.Class.getDeclaredMethods(Class.java:1791)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .webbeans
> .component.ClassComponent.introspectProduces(ClassComponent.java:192)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .webbeans.component.ClassComponent.introspect(ClassComponent.java:175)
> [11:34:44.640] {resin-30} at
> com
> .caucho.webbeans.component.ClassComponent.init(ClassComponent.java:
> 122)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .webbeans
> .manager.WebBeansContainer.createTransient(WebBeansContainer.java:827)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server
> .dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:
> 812)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server
> .dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:732)
> [11:34:44.640] {resin-30} at
> com.caucho.server.dispatch.ServletManager.init(ServletManager.java:
> 159)
> [11:34:44.640] {resin-30} at
> com.caucho.server.webapp.WebApp.start(WebApp.java:1874)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server.deploy.DeployController.startImpl(DeployController.java:667)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server.deploy.DeployController.restartImpl(DeployController.java:630)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server
> .deploy
> .StartAutoRedeployAutoStrategy
> .alarm(StartAutoRedeployAutoStrategy.java:177)
> [11:34:44.640] {resin-30} at
> com
> .caucho
> .server.deploy.DeployController.handleAlarm(DeployController.java:789)
> [11:34:44.640] {resin-30} at
> com.caucho.util.Alarm.handleAlarm(Alarm.java:375)
> [11:34:44.640] {resin-30} at com.caucho.util.Alarm.run(Alarm.java:
> 345)
> [11:34:44.640] {resin-30} at
> com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730)
> [11:34:44.640] {resin-30} at
> com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649)
> [11:34:44.640] {resin-30} at java.lang.Thread.run(Thread.java:619)
> --
> View this message in context: http://n2.nabble.com/jersey-not-mapping-requests-tp1112799p2423551.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>