commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <>
Subject Re: [logging][PROPOSAL] a solution to incompatibility between log4j versions
Date Thu, 20 May 2004 09:32:08 GMT
At 11:08 PM 5/19/2004, robert burrell donkin wrote:
>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 
  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(
     at java.lang.Class.getConstructor0(
     at java.lang.Class.getConstructor(
     at org.apache.commons.logging.LogFactory.getLog(

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  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message