Hi,
The package scanning should also work for classes in jars located in
the WEB-INF/lib, if such classes can be loaded.
Do you have all the Jersey/JAX-RS related jars in war or installed in
Tomcat, if so what jars are you using?
What is the output from the tomcat log?
Could you try the following:
Enumeration<URL> urls = classloader.getResources("com/navis/framework/
rest/resources");
to see what URLs are returned.
Paul.
On Jun 15, 2009, at 8:16 PM, Gisella%20Saavedra%20%5Bgisellas
%40yachay.net%5D wrote:
> I have a web application where the appl. server is Tomcat 5.5.
>
> The ant build script jars the .class files.
>
> I am getting this error
> com.sun.jersey.api.container.ContainerException: The ResourceConfig
> instance does not contain any root resource classes.
>
> because the resource package root class specified
> (com.navis.framework.rest.resources) is not found in the WEB-INF/
> classes because it is packaged in
> a jar file in WEB-INF/lib/xxx.jar
>
> This is my servlet definition, what can I do to make it work, to
> tell jersey to look at the .jars in the WEB-INF/lib?
> By the way, the classLoader is
> org.apache.catalina.loader.WebAppClassLoader.
>
> <servlet>
> <servlet-name>JerseyRESTServices</servlet-name>
> <servlet-
> class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-
> class>
> <init-param>
> <param-
> name>com.sun.jersey.config.property.resourceConfigClass</param-name>
> <param-
> value>com.sun.jersey.api.core.PackagesResourceConfig</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</
> param-name>
> <param-value>com.navis.framework.rest.resources</param-
> value>
> </init-param>
> <load-on-startup>4</load-on-startup>
> </servlet>
>
>