users@glassfish.java.net

Re: V3 b25 - apache logger not casting - different Classloader maybe...

From: Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 22 Sep 2008 08:52:07 +0530

You can't use classes from apache-commons-${version}.jar in your
application. They are loaded by a different class loader and are not
visible to applications. You need to use your apache commons classes in
your web app. You can either bundle them in your app or place them in
domain1/lib.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I've tried the logger in apache-commons-10.0-SNAPSHOT.jar as well as older versions.
>
> If I compile the webapp but don't include the jar in the war's lib I get classnotfound on the logger.
>
> If the jar is included in the war then get the castable issue:
>
> [code]
> Caused by: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl cannot be cast to org.apache.commons.logging.LogFactory
> at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:504)
> [/code]
> [Message sent by forum member 'rimartin7' (rimartin7)]
>
> http://forums.java.net/jive/thread.jspa?messageID=300597
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>