harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-frederic Clere <jfcl...@gmail.com>
Subject Strange thing with jchevm/classpath
Date Sun, 26 Feb 2006 22:27:01 GMT
Hi,

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 code used to reproduce the problem is the following:
+++
import java.lang.reflect.Constructor;

public class toto {
        public static void main(String argv[]) {

                Class myclass[] = { java.lang.String.class };
                try {
                        Class logClass = 
Class.forName("org.apache.commons.logging.impl.Log4JLogger");
                        Constructor titi =  
logClass.getConstructor(myclass);
                } catch(Exception e) {
                        e.printStackTrace();
                }
        }
}
+++

Any hints?

Cheers

Jean-Frederic

Mime
View raw message