commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier LAMY" <LAMY_Oliv...@accor-hotels.com>
Subject apache.commons.logging exception
Date Mon, 21 Oct 2002 13:21:48 GMT
Hi all,
I have a strange error.
A servlet initialize log4j. Then I want to use commons.logging with the
following code :
public class LogFactory {
/** chargement class en static */
private static final org.apache.commons.logging.LogFactory logFactory =
getLogFactory();
/**
* Method getLog. renvoie un objet de log
* @param name
* @return Log
*/
public static Log getLogger(String name) {
return logFactory.getLog(name);
}
/**
* Methode getLogFactory.
* @return LogFactory
*/
private static final org.apache.commons.logging.LogFactory getLogFactory() {
return Log4jFactory.getFactory();
}
}
This code works fine with w2k, jdk1.4, tomcat 4.1.12 commons-logging 1.0.2
and log4j 1.2.7
But not with Eas Server 3.6.1, jdk1.2 and commons-logging 1.0.2 and log4j
1.2.7.
I have the following exception :
Oct 21 15:09:46 2002: java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException
        at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java,
Compiled Code)
        at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java,
Compiled Code)
        at com.accor.util.logger.LogFactory.getLogFactory(LogFactory.java,
Compiled Code)
        at com.accor.util.logger.LogFactory.<clinit>(LogFactory.java:15)
        at com.accor.util.logger.Log4jInit.init(Log4jInit.java, Compiled
Code)
        at com.sybase.jaguar.servlet.JagServlet.init(JagServlet.java,
Compiled Code)
        at
com.sybase.jaguar.servlet.ServletPool.createInitializedInstance(ServletPool.
java, Compiled Code)


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message