I noticed, while migrating some code from JBoss 3.2.7 to JBoss 4.0.4.GA, that there's a problem with "commons-logging.jar". I tried building something, with the JBoss version of this jar in my classpath, and I got a "cannot resolve symbol" error.
symbol : method getLogger ()
location: class org.apache.commons.logging.impl.Log4JLogger
Logger logger = ((Log4JLogger)log).getLogger();
Interesting... I took a look at the Apache commons logging javadocs, and they do list "getLogger" as a public method of "Log4JLogger". Just to be sure, I checked the javadocs for all releases... Every release since "Logger" superceded "Category" does have this method.
I next looked at the "jar-versions.xml" file, supplied with the JBoss distribution. It lists the "implVersion" for "commons-logging.jar" as "1.0.5.GA-jboss" and indicates that this is a patched version from JBoss.
I read something elsewhere on the JBoss site indicating that this patch somehow involves dynamic loading of the log4j.jar (or was it log4j.properties?) Maybe someone decided to conveniently eliminate a pesky method, while working on this patch...
Is this API change a mistake, or is it intentional? I don't think Apache would be happy to know that JBoss is changing their API! :)
Any suggestions on getting around this, besides "don't call that method"? I'm not using .ear files, so it's not easy for me to replace commons-logging.jar just for my application. (I'd have to drop a replacement jar into the "deploy" directory, or my own "lib" directory, and I think that would cause trouble.
Thanks for any insight!
Mike