You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Pedro Moreno <pe...@gmail.com> on 2009/03/23 19:21:37 UTC

problem with log4j...Help Please!!!

Hi I’m very desperate with this problema. I’ve spent all day searching on
Internet about this issue and trying several solution but no one works.

The Problem is: I have a Sip client which implements a OSGI framework and
one of the bundle is a log4j.jar, exactly release log4j-1.2.8. I want to
integrate with axis, which has the log4j-1.2.8 as well. But, in the
build.xml I only use the original log4j-1.2.8, i.e. I use axis with the
log4j.rar belonging to SIP client.

So the error I get at the output is the following:


     [java] log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not
assignable to a "org.apache.log4j.Appender" variable.
     [java] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
     [java] log4j:ERROR [25.0] whereas object of type
     [java] log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
[sun.misc.Launcher$AppClassLoader@11b86e7].
     [java] log4j:ERROR Could not instantiate appender named "CONSOLE".
     [java] log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not
assignable to a "org.apache.log4j.Appender" variable.
     [java] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
     [java] log4j:ERROR [25.0] whereas object of type
     [java] log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
[sun.misc.Launcher$AppClassLoader@11b86e7].
     [java] log4j:ERROR Could not instantiate appender named "CONSOLE".


Can anyone help me??

Re: problem with log4j...Help Please!!!

Posted by Ceki Gulcu <ce...@qos.ch>.
The error means that you have two copies of log4j.jar loaded into memory at the 
same time by two different class loaders. Classes loaded by different class 
loaders are incompatible even if the classes are bitwise identical.

Pedro Moreno wrote:
> So the error I get at the output is the following:
> 
> 
>      [java] log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not
> assignable to a "org.apache.log4j.Appender" variable.
>      [java] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
>      [java] log4j:ERROR [25.0] whereas object of type
>      [java] log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
> [sun.misc.Launcher$AppClassLoader@11b86e7].
>      [java] log4j:ERROR Could not instantiate appender named "CONSOLE".
>      [java] log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not
> assignable to a "org.apache.log4j.Appender" variable.
>      [java] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
>      [java] log4j:ERROR [25.0] whereas object of type
>      [java] log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
> [sun.misc.Launcher$AppClassLoader@11b86e7].
>      [java] log4j:ERROR Could not instantiate appender named "CONSOLE".
> 
> 
> Can anyone help me??
> 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org