Hi,
It looks like the the class loader that is being used is only
configured to load classes from the WEB-INF/classes directory.
Is there any way to configure, via tomcat, to configure the class
loader to load from "WEB-INF/classes" and "WEB-INF/lib" ?
I tried a quick test with Glassfish v3 Prelude and it works fine
picking up classes in "WEB-INF/classes" and "WEB-INF/lib"
Just curious if you remove you init params from your web.xml then
class scanning should kick in and it will try and scan for stuff in
"WEB-INF/classes" and "WEB-INF/lib", i wonder if that works.
A work around is to define your own concrete implementation of
javax.ws.rs.Application and explicitly declare your resource classes.
Paul.
On Jun 16, 2009, at 7:44 PM, Saavedra, Gisella wrote:
>
> I am enclosing the image of the scan() call (jersey_package_scan.png
> for .class files in WEB-INF/lib/xxx.jar). At the point that
> Enumeration<URL> urls = classloader.getResources("com/navis/
> framework/rest/resources");
> is called, the URL classpath points to the tomcat 5.5 server path.
> That is what it looks like.
> urls.hasMoreElements() returns false (no elements).
>
> I have the Jersey jars in WEB-INF/lib.
> I am using
> jersey-client-1.1.0-ea.jar
> jersey-server-1.1.0-ea.jar
> jersey-core-1.1.0-ea.jar
>
> The jaxb- 2.1.x libs
> The jsr311-api-1.1.jar, activation, asm, persistence.
>
>
> When I put the .class files under WEB-INF/classes, my application
> works. I have enclosed a second image showing that the package is
> found in the WEB-INF/classes directory
> (jersey_package_scan_class_dir.png for .class files in WEB-INF/
> classes) .
>
> The problem is that we do deliver our application in .jar files, so
> I really need to resolve this problem.
>
> Any suggestion, please I will appreciate.
>
> Thanks.
>
>
>
>
> Gisella Saavedra
> Sr. Software Engineer
> gsaavedra_at_zebra.com
> <image001.gif>
> 1000 Broadway, Suite 150, Oakland, CA 94607 | T+1 510 267 5123 T
> Main+1 510 267 5000 F+1 510 267 5100 | http://www.zebra.com/zes
>
>
>
> <jersey_package_scan_class_dir.png><jersey_package_scan.png>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net