Ceki G�lc� schrieb:
But it looks like the change isnt really backward compatible, i have tried this now and got the following exception (patched commons-logging and log4j-1.2.8):
java.lang.NoSuchMethodError: org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.Log4JLogger.fatal(Log4JLogger.java:161)
at org.apache.commons.vfs.test.RunTest.main(RunTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
The change was in the Category class, formerly the log methods accepted a priority but this has change to a level now.
The above looks wrong to me. Are you sure you don't have stale classes around during compilation?
Here you wrote http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=108436289322053&w=2
getLogger().log(FQCN, Priority.FATAL, message, t );
need to be changed to
getLogger().log(FQCN, Logger.FATAL, message, t );
In fact you meant Level.xxx instead of Logger.xxx, or?
I compiled commons-logging against the log4j cvs-head and tried to run it with 1.2.8, that failed as above.
Now i tried commons-logging againt log4j-1.2.8 and tried to run it with cvs-head, that failed too.
Exception during startup processing
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Priority;Ljava/lang/Object;Ljava/lan
g/Throwable;)V
at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:152)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:155)
at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1117)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:579)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)
at org.apache.catalina.startup.Catalina.start(Catalina.java:511)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
... 5 more
For me it looks like the change is for sure compile-time compatible, but not runtime compatible. I watched out not to do something wrong, hopfully this was the case.
Maybe we relly need a new Log4J implementation depending on its version .... this is bad, isnt it?
Don't gump the gun yet.
No - sorry, wont be destructive.
-- Mario
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
