java - User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable -
i working in web application. tried removing jar duplication war web-inf/lib/*.jar. helped me in excluding jar war. while deploying ear in websphere have follwing issue,
i have checked war class path contains log4j.jar , common-logging1.1.jar.
kindly help!!!
error log:
[7/6/12 22:34:10:577 cest] 00000165 webapp e com.ibm.ws.webcontainer.webapp.webapp notifyservletcontextcreated srve0283e: exception caught while initializing context: {0} org.apache.commons.logging.logconfigurationexception: user-specified log class 'org.apache.commons.logging.impl.log4jlogger' cannot found or not useable. @ org.apache.commons.logging.impl.logfactoryimpl.discoverlogimplementation(logfactoryimpl.java:874) @ org.apache.commons.logging.impl.logfactoryimpl.newinstance(logfactoryimpl.java:604) @ org.apache.commons.logging.impl.logfactoryimpl.getinstance(logfactoryimpl.java:336) @ org.apache.commons.logging.impl.logfactoryimpl.getinstance(logfactoryimpl.java:310)
websphere 6.1 includes commmons logging itself, loaded higher classloader web application. (you can see jcl classes loaded deploying this jsp application , typing in 1 jcl class names.) you've got jcl configured load log4j classes, higher level (parent) classloader can't see log4j classes lower level web application classloader.
so 1 solution, particularly if require 1.1 version of jcl rather websphere's included version (1.0), change websphere classloader policy parent last.
since changing classloader policy can have other effects, option use websphere's included version , use technique tell use log4j logging mechanism within application. note since websphere 6.1 doesn't include entire jcl1.0, you'll need deploy full jcl 1.0 application.
Comments
Post a Comment