You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Nellya Udovichenko (JIRA)" <ji...@apache.org> on 2006/11/24 17:54:02 UTC

[jira] Created: (GERONIMO-2595) Hardcoded MX4J logger in org.apache.geronimo.kernel.log.GeronimoLogging class

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

        

[jira] Closed: (GERONIMO-2595) Hardcoded MX4J logger in org.apache.geronimo.kernel.log.GeronimoLogging class

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-2595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Dillon closed GERONIMO-2595.
----------------------------------

    Resolution: Fixed
      Assignee: Jason Dillon

This has been fixed for 1.2 and 2.0

> Hardcoded MX4J logger in org.apache.geronimo.kernel.log.GeronimoLogging class
> -----------------------------------------------------------------------------
>
>                 Key: GERONIMO-2595
>                 URL: https://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
>            Assignee: Jason Dillon
>
> 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.
-
You can reply to this email to add a comment to the issue online.