On 01/ 6/10 03:14 PM, glassfish_at_javadesktop.org wrote:
> In short, when deploying an application using commons-logging (configured to use log4j) in glassfish v3, I get this error in the logs:
>
> SEVERE: log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
> SEVERE: log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
> SEVERE: log4j:ERROR [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)] whereas object of type
> SEVERE: log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)].
> SEVERE: log4j:ERROR Could not instantiate appender named "console".
>
> However, the same app works fine when deployed in glassfish v2.1.
>
> Any ideas?
>
glassfish v4? :)
The above error means that the "Appender" interface and the
"ConsoleAppender"
class that implements it have been loaded by different class loaders,
causing an error
when the latter is cast to the former.
We have a few unit tests that use commons-logging configured for log4j,
and they
all pass.
At what point in your application's lifecycle to you get the above error?
Would it be possible for you to supply a simple test case?
Thanks,
Jan
> [Message sent by forum member 'rwillie6' (ryanwilson.m_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=379129
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>