[slf4j-dev] commons-logging > slf4j > log4j NullPointerException

jigarjm jigarjm at gmail.com
Sun Nov 3 22:19:30 CET 2013


my app is using axis api for some purpose, axis uses commons-logging for
logging, I have jcl-over-slf4j to route commons-logging logs to slf4j

and I am using log4j binding with slf4j

when it attempts to make the instance it throws NullPointerException

<code>
   Caused by: java.lang.NullPointerException
   	at org.apache.log4j.Logger.isTraceEnabled(Logger.java:205)
   	at
org.slf4j.impl.Log4jLoggerAdapter.isTraceCapable(Log4jLoggerAdapter.java:83)
   	at org.slf4j.impl.Log4jLoggerAdapter.<init>(Log4jLoggerAdapter.java:78)
   	at
org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:46)
   	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
   	at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
   	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:291)
   	at
org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37)
   	at org.apache.axis.client.Call.<clinit>(Call.java:132)
<code>

I am using custom Log4jLoggerFactory.java & line 46 is just constructor call
with not null logger being passed on

Any clue why it is not setting repository in log4j and it leaves it as null

I have

jcl-over-slfj4
log4j
slf4j-api
axis

in classpath







--
View this message in context: http://slf4j.42922.n3.nabble.com/commons-logging-slf4j-log4j-NullPointerException-tp4025636.html
Sent from the slf4j - dev mailing list archive at Nabble.com.


More information about the slf4j-dev mailing list