users@glassfish.java.net

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

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Sun, 21 Sep 2008 20:55:00 -0700

Sahoo wrote:
> 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
"Your...classes"? From where? Why do they have to be different? What if
they are the same?
> in your web app. You can either bundle them in your app or place them
> in domain1/lib.
...as long as it is not the jar from V3? Humm...

Not very clear...
Ludo
>
> 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>