users@jersey.java.net

Re: [Jersey] Jersey-Spring: java.lang.NoSuchMethodError: com.sun.jersey.spi.container.WebApplication.initiate

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 11 Mar 2009 16:24:13 +0100

Hi

What are the jars in your class path?

I suspect you are using 1.0.2 and say 1.0.1 versions together.

Paul.

On Mar 11, 2009, at 4:00 PM, da_bus_at_arcor.de wrote:

> Hi,
>
> I am trying to use Jersey 1.0.2 with Spring-integration (2.5.6) on
> Glassfish 2.1. I changed the web.xml according to the example in the
> JavaDoc of com.sun.jersey.spi.spring.container.servlet and I defined
> a bean in the applicationContext.xml file.
>
> I can deploy the service without getting any errors, but when I try
> to access the resource I get the error stated below. Can anyone help
> me figuring out what went wrong?
>
> Thanks for any help,
> M.S.
>
>
>
> The spring Component annotation is present: using spring >= 2.5
> WebModule[/MessagingService]StandardWrapper.Throwable
> java.lang.NoSuchMethodError:
> com.sun.jersey.spi.container.WebApplication.initiate(Lcom/sun/jersey/
> api/core/ResourceConfig;Lcom/sun/jersey/spi/service/
> ComponentProvider;)V
> at
> com
> .sun
> .jersey
> .spi
> .spring.container.servlet.SpringServlet.initiate(SpringServlet.java:
> 66)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.load(WebComponent.java:433)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:167)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 197)
> at
> org
> .apache
> .catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194)
> at
> org
> .apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
> 848)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 222)
> at
> org
> .apache
> .catalina
> .core.StandardContextValve.invokeInternal(StandardContextValve.java:
> 287)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 218)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:
> 94)
> at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke
> (PESessionLockingStandardPipeline.java:98)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 587)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 166)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 587)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> 288)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
> (DefaultProcessorTask.java:647)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
> (DefaultProcessorTask.java:579)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
> (DefaultProcessorTask.java:831)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
> (DefaultReadTask.java:341)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:263)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:214)
> at com.sun.enterprise.web.portunif.PortUnificationPipeline
> $PUTask.doTask(PortUnificationPipeline.java:380)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:
> 265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run
> (SSLWorkerThread.java:106)
> StandardWrapperValve[Jersey Spring Web Application]: PWC1382:
> Allocate exception for servlet Jersey Spring Web Application
> java.lang.NoSuchMethodError:
> com.sun.jersey.spi.container.WebApplication.initiate(Lcom/sun/jersey/
> api/core/ResourceConfig;Lcom/sun/jersey/spi/service/
> ComponentProvider;)V
> at
> com
> .sun
> .jersey
> .spi
> .spring.container.servlet.SpringServlet.initiate(SpringServlet.java:
> 66)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.load(WebComponent.java:433)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:167)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 197)
> at
> org
> .apache
> .catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194)
> at
> org
> .apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
> 848)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 222)
> at
> org
> .apache
> .catalina
> .core.StandardContextValve.invokeInternal(StandardContextValve.java:
> 287)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 218)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:
> 94)
> at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke
> (PESessionLockingStandardPipeline.java:98)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 587)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 166)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 587)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> 288)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
> (DefaultProcessorTask.java:647)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
> (DefaultProcessorTask.java:579)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
> (DefaultProcessorTask.java:831)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
> (DefaultReadTask.java:341)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:263)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:214)
> at com.sun.enterprise.web.portunif.PortUnificationPipeline
> $PUTask.doTask(PortUnificationPipeline.java:380)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:
> 265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run
> (SSLWorkerThread.java:106)
>
>
> Erwischt! Bei Arcor sehen Sie die besten Promi-Bilder riesengroß und
> in Top-Qualität. Hier finden Sie die schönsten Schnappschüsse auf
> dem roten Teppich, lernen die Frauen des Womanizers Boris Becker
> kennen und schauen den Royals ins Wohnzimmer. Viel Spaß auf Ihrer
> virtuellen Reise durch die Welt der Stars und Sternchen: http://vip.arcor.de
> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>