users@glassfish.java.net

Re: commons-logging classloading problem in v2-b41 ?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 13 Apr 2007 14:50:24 -0700

Hi Kristof,

glassfish_at_javadesktop.org wrote On 04/12/07 08:07 AM,:

>Hi Jan,
>
>sorry for the late answer, I'll have more time from now tracking down this issue.
>
>Appearently if I do not bundle commons-logging+log4j to my application, I get a NoClassDefFoundError: org/apache/commons/logging/LogFactory no matter if these jars are in domains/domain1/lib/applibs or whether the delegate setting is true or false in my sun-web.xml.
>
>If I bundle these jar files, I get the following log: http://ond.vein.hu/~dyn/log-success-then-fail.txt
>
>

OK, here is where I am getting confused. :)

In your original posting, you mentioned placing the log4j and
commons-logging JAR files
"to the glassfish domain lib dir".

In a subsequent exchange with Siva, as well as above, you mentioned that
you placed the JAR
files "in domains/domain1/lib/applibs" - which is different from the
domain's lib dir.

Then, you mention that the contents of log-success-then-fail.txt reflect
the scenario where
the JAR files are bundled in WEB-INF/lib, yet, the application classpath
output in
log-success-then-fail.txt includes:

  /usr/local/java/glassfish-v2-b41/lib/commons-logging.jar

which is not present in a "clean" installation.

Can you remove the commons-logging.jar from the domain's lib directory
when you test the "locally bundled" scenario, or, if you want to keep it there,
can you also copy the log4j JAR file there?

Thanks,


Jan