harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cobbs <arc...@dellroad.org>
Subject Re: Strange thing with jchevm/classpath
Date Sun, 26 Feb 2006 22:55:09 GMT
Jean-frederic Clere wrote:
> I have a "strange" error:
> +++
> java.lang.NoSuchMethodError: 
> org/apache/log4j/Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V

> 
>        at java.lang.VMThrowable.fillInStackTrace(Native Method)
>        at java.lang.Throwable.fillInStackTrace(Throwable.java:498)
>        at java.lang.Throwable.<init>(Throwable.java:159)
>        at java.lang.Error.<init>(Error.java:81)
>        at java.lang.LinkageError.<init>(LinkageError.java:72)
>        at 
> java.lang.IncompatibleClassChangeError.<init>(IncompatibleClassChangeError.java:71)

> 
>        at java.lang.NoSuchMethodError.<init>(NoSuchMethodError.java:72)
>        at java.lang.VMClass.forName(Native Method)
>        at java.lang.Class.forName(Class.java:161)
>        at toto.main(toto.java:8)
> +++
> 
> Looking log4j I have found the following in Category.java:
> +++
> void log(String callerFQCN, Priority level, Object message, Throwable t)
> +++
> and in Level.java :
> +++
> public class Level extends Priority implements Serializable {
> +++
> So why is the method log no found?

The method matching algorithm that would allow a method having
2nd parameter type "Priority" to be used for an invocation that
has a 2nd parameter of type "Level" happens during compilation,
not runtime. In other words, an "incompatible class change" has
truly occurred it seems and in such a case the exception is
expected.

However, how did the classes change? I tried to reproduce this
with log4j-1.2.13 but couldn't. Can you give more detail on how
you compiled Classpath and what version of log4j you're using?

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Mime
View raw message