users@jersey.java.net

Re: [Jersey] Jersey + WEBDav problem on Tomcat 6

From: Daniel Manzke <daniel.manzke_at_googlemail.com>
Date: Sat, 7 Feb 2009 18:18:51 +0100

Hi,
I read your post about using WebDAV and Tomcat6. Due the fact that Markus
(and me) working on Tomcat 6 Support/Example I tried it, too. But I didn't
get it work.

My Tomcat 6 throws an exception:

07.02.2009 18:07:11 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: StandardWrapper.Throwable
java.lang.NoSuchMethodError:
com.sun.jersey.spi.inject.InjectableProvider.getScope()Lcom/sun/jersey/spi/service/ComponentProvider$Scope;
at
com.sun.jersey.impl.application.InjectableProviderFactory.findInjectableProviders(InjectableProviderFactory.java:176)
at
com.sun.jersey.impl.application.InjectableProviderFactory._getInjectable(InjectableProviderFactory.java:226)
at
com.sun.jersey.impl.application.InjectableProviderFactory.getInjectable(InjectableProviderFactory.java:204)
at
com.sun.jersey.impl.application.InjectableProviderFactory.injectResources(InjectableProviderFactory.java:351)
at
com.sun.jersey.impl.application.WebApplicationImpl.injectResources(WebApplicationImpl.java:314)

Could it be that I have a wrong version of Jersey? Is there any example how
to use Jersey/JAX-RS with Tomcat?

My web.xml:

  <servlet>
   <servlet-name>JAX-RS REST Servlet</servlet-name>
   <servlet-class>
   com.sun.jersey.spi.container.servlet.ServletContainer
   </servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>de.java.dev.webdav.fileserver.tomcat.FileServerApplication</param-value>
</init-param>
   <load-on-startup>1</load-on-startup>
  </servlet>

Which JARs are needed for Tomcat Support? Is it okay, when they are placed
in the WEB-INF/lib?



BR,
Daniel :)

2009/2/5 Paul Sandoz <Paul.Sandoz_at_sun.com>

>
> On Feb 5, 2009, at 12:13 PM, Christopher Schmidt wrote:
>
> We are using Grizzly like this:
>>
>> GrizzlyServerFactory.create("http://localhost:80/",
>> RuntimeDelegate.getInstance().createEndpoint(new WebDAVApplication(),
>> Adapter.class));
>>
>>
> OK. We need to ascertain if the Jersey servlet is at fault or not (i
> suspect not but still...). You can use the Grizzly Web container support as
> follows:
>
> Map<String, String> initParams = new HashMap<String, String>();
> initParams.put("javax.ws.rs.Application",
> WebDAVApplication.class.getName());
> GrizzlyWebContainerFactory.create("http://localhost:80/", params);
>
> The Grizzly Web container will use the Jersey ServletContainer.
>
>
> Yes, @GET works fine.
>>
>>
> OK.
>
>
> Maybe Tomcat is blocking the PROPFIND method, this would be a
>> configuration issue.
>>
>
> If you add the logging filter as i suggested you can ascertain if the
> PROPFIND request is hitting the Jersey ServletContainer or not.
>
>
> Do I have to do anything special with the Tomcat config?
>>
>>
> I do not know.
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>


-- 
Mit freundlichen Grüßen
Daniel Manzke