Hardcoded MX4J logger in org.apache.geronimo.kernel.log.GeronimoLogging class
-----------------------------------------------------------------------------

                 Key: GERONIMO-2595
                 URL: http://issues.apache.org/jira/browse/GERONIMO-2595
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Logging
    Affects Versions: 1.2
            Reporter: Nellya Udovichenko


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});
    paramClazz = Class.forName("mx4j.log.CommonsLogger");
    method.invoke(null, new Object[] {paramClazz.newInstance()});
    ...
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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to