users@jersey.java.net

Re: [Jersey] ClassNameResourceConfig.PROPERTY_CLASSNAMES ignored with Grizzly Web and EmbeddedGlassFish test containers

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 13 Oct 2009 12:34:21 +0200

On Oct 13, 2009, at 12:12 PM, Naresh wrote:

> Hi Paul,
>
> that commit had fixed the problem with transformation.
>

Ah, got the wrong end of the stick!


> But, in my case I'm working with WebAppDescriptor (test), and see
> that the property PROPERTY_CLASSNAMES is ignored and
> ClasspathResourceConfig is initialized when I try using the Grizzy
> Web test container type.
>

When using the Web layer it attempts to look in certain well known
directories of the Web app, namely WEB-INF/lib and WEB-INF/classes.
The trouble is this approach is not very portable, so we might be
hitting an issue w.r.t embedded GF and a limitation in Grizzly's
servlet support.

It may also be related to the way the tests are built, do the
following directories exist?

   /home/naresh/workspace/tango/qe-tests/jersey-tests/core-tests/
coretest2/WEB-INF/lib
   /home/naresh/workspace/tango/qe-tests/jersey-tests/core-tests/
coretest2/WEB-INF/classes


> The test in the attached zip file shows the behavior, just unzip it
> and do *mvn test*.
>

I have no time to investigate at the moment, can you debug into Jersey
and try and find the reason why the following is logged?

WARNING: File, /home/naresh/workspace/tango/qe-tests/jersey-tests/core-
tests/coretest2/WEB-INF/lib, is ignored, it not a directory, a jar
file or a zip file

Paul.