users@jersey.java.net

[Jersey] Re: Tomcat can't load com.sun.jersey.spi.container.servlet.ServletContainer, but Glasfish can

From: Glen Mazza <gmazza_at_talend.com>
Date: Tue, 14 Feb 2012 17:33:56 -0500

Hmm...I tested the instructions I gave you. I'm not sure why it works
for me but not for you.

Glen

On 02/14/2012 05:18 PM, Sven Strittmatter wrote:
> Hi Glen,
>
> tried already this
> https://blogs.oracle.com/japod/entry/building_simple_jersey_web_app
> and now your's example. It's not really a difference.
>
> IMO it is not a problem of deploing. I trid several alternatives:
> deploy by Netbeans, by maven and via the Tomcats Manager App. Always
> the same result: If I pack the jersey-bundle-1.11.jar (Downloaded from
> sun/oracle site) by hand into WEB-INF/lib, then it works. Unless I add
> it Tomcat does not have any
> "com.sun.jersey.spi.container.servlet.ServletContainer".
>
> I inspected the jersey-bundle-1.11.jar an guess what: There is a
> com.sun.jersey.spi.container.servlet.ServletContainer class. But in my
> Maven dependenies:
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-server</artifactId>
> <version>1.11</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-client</artifactId>
> <version>1.11</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-json</artifactId>
> <version>1.11</version>
> <scope>compile</scope>
> </dependency>
>
> and the subdependency jersy-core-1.11.jar this class is missing.
> What do I have to add as dependency? All examples I've found mention
> only jersey-server and some test scope dependencies.
>
> Chers
> Sven


-- 
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza