hi ceki
i've committed a patch along the lines you've proposed. many thanks :)
You are welcome.
i've added some optional unit tests that give me confidence that a version of commons-logging compiled against log4j CVS HEAD will run against 1.2.7. it'd be a good idea to find a way for gump to run this test (but i'm not too sure at the moment how to do this). i'll probably add another where the log4j 1.3 jar is explicitly specified tomorrow.
Why 1.2.7? The latest official release is 1.2.8. It won't make any difference in practice but I'm curious nonetheless.
running a version compiled against 1.2.x to run against 1.3 would be nice but not critical. i suspect that your code will only work one way but i'd be glad to be proved wrong. maybe i'll find time to take a look into this tomorrow.
As I mentioned in a previous message, the patch makes C-L compiled with current CVS head
(1.3pre-alpha) both compile time and runtime (binary) compatible with 1.2.x and obviously 1.3 itself.
As you correctly guessed, the patch does not work when C-L is compiled against 1.2.x. More specifically, it wont run with 1.3. One gets the following java.lang.VerifyError:
No suitable Log constructor [Ljava.lang.Class;@f9f9d8 for org.apache.commons.logging.impl.Log4JLogger
java.lang.VerifyError: (class: org/apache/commons/logging/impl/Log4JLogger, method: warn signature:
(Ljava/lang/Object;Ljava/lang/Throwable;)V) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
at java.lang.Class.getConstructor0(Class.java:1762)
at java.lang.Class.getConstructor(Class.java:1002)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:531)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:369)
at org.apache.commons.logging.log4j.DefaultConfigTestCase.setUpLog(DefaultConfigTestCase.java:179)
at org.apache.commons.logging.log4j.DefaultConfigTestCase.setUp(DefaultConfigTestCase.java:81)
The above error does not make any sense to me. Do you have an idea of what's going on?
- robert
-- Ceki G�lc�
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
