Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Security Level: public (Regular issues)
-
None
Description
Description: MX4J logger class (mx4j.log.CommonsLogger) is hardcoded in org.apache.geronimo.kernel.log.GeronimoLogging:
...
Class clazz = Class.forName("mx4j.log.Log");
Class paramClazz = Class.forName("mx4j.log.Logger");
Method method = clazz.getDeclaredMethod("redirectTo", new Class[]
);
paramClazz = Class.forName("mx4j.log.CommonsLogger");
method.invoke(null, new Object[]
);
...
So you can't have another logger class instead of default one.
If you use JDK with mx4j.jar in bootclasspath (Apache Harmony, for example), mx4j can't access commons-logging.jar
that is only available in classpath, so Geronimo doesn't start and NoClassDefFoundError exception occurs.
And there's no way to replace mx4j.log.CommonsLogger with another logger.
Looks like there're two ways to resolve this problem:
1. Comment the code above and use the existing mechanism in mx4j to set the property 'mx4j.log.prototype' from the command line.
2. Add the property to xml file (pom.xml?), and use 'mx4j.log.CommonsLogger' as default value.
Attachments
Issue Links
- is related to
-
HARMONY-1259 NoClassDefFoundError while working with MX4J loggers
- Open