Hi

Maybe I have missed something, but I seem to have a problem with moving 
to 1.2.6 log4j.

I have code compiled against 1.1.3 that now fails when run with 1.2.6 in 
the classpath.

This is an example of code that fails - it's quite small:

import org.apache.log4j.*;

public class Test
{
    public static Category _cat = 
Category.getInstance(Test.class.getName());

    public static void main(String[] args)
    {
    Priority p = _cat.getPriority();
    }
}

Not much to it ;-)

If I compile this against 1.1.3, and run it - OK.  Similarly, compile 
and run with 1.2.6 - OK.

BUT when I compile with 1.1.3 and run against 1.2.6, on NT using JDK 
1.3.1_01, I get

Exception in thread "main" java.lang.NoSuchMethodError
        at Test.main(Test.java:9)

[ get similar results with 1.3.1 on Sun, 1.4.0 on Linux ]

This means that any class I have that uses the above call must now be 
recompiled to work with 1.2.6.

I was under the impression that I could just drop the 1.2.6 jar as a 
replacement in the runtime
environment and everything was OK.  Seems that all the app code needs to 
be recompiled
to get it to work with 1.2.6 (if it uses the above code).

Looking at the project history, the above seems remarkably close to

 - Source code written for log4j 1.1.3.jar will compile fine with
   log4j 1.2X. However, code compiled for log4j 1.1.3 would previously
   systematically throw "java.lang.NoSuchMethodError" runtime exceptions
   when run with log4j 1.2 - prior to beta2. This problem has been
   corrected in beta2. Pheew, that was a close one. [*]

This is what I am seeing - but with 1.2.6 (and 1.2.5).

Could someone verify/refute the above?

Thanks in advance

- chris



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to