Archie Cobbs wrote:

Jean-frederic Clere wrote:

So either something weird is happening (always possible), or you have some
other incompatible version of log4j on your classpath, or something
in your classpath was compiled against another version of log4j, etc.


My test is using:
Class.forName("org.apache.commons.logging.impl.Log4JLogger");
I have rebuild commons-logging using the log4j I am using in the test and the test is working now. But I still don't understand why it was working with the Sun JVM before!!!


Probably due to classpath differences. E.g. do you have a CLASSPATH
environment variable set? Sun pays attention to it, jchevm does not.

That seems not to be a CLASSPATH problem, with the Sun JVM the used jar files are:
+++
open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/rt.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/sunrsasign.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/jsse.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/jce.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/charsets.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/JAVA/j2sdk1.4.2_06/jre/lib/ext/localedata.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/TOMCAT/apache-tomcat-5.5.15/common/lib/commons-logging.jar", O_RDONLY|O_LARGEFILE) = 3 open("/home/jfclere/TOMCAT/apache-tomcat-5.5.15/common/lib/log4j-1.2.13.jar", O_RDONLY|O_LARGEFILE) = 3
+++
jc uses the same common-logging and log4j jar files...

Geir idea is also a good hint:
The lastest commons-logging is from 15-Jun-2004, it was not compiled with log4j-1.2.13 but with something else. I have tried this commons-logging with logging-log4j-1.3alpha-8 and jc works ok.
I think I will ask commons-dev@jakarta.apache.org about it ;-)

Cheers

Jean-Frederic



-Archie

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


Reply via email to