commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spies, Brennan" <Brennan.Sp...@ejgallo.com>
Subject RE: [Logging] Log4jLogger does not implement Log error in Websphere 6.1.0.15 environment
Date Fri, 25 Apr 2008 16:45:10 GMT
Nitin,

You are probably running into two issues 1) WebSphere uses its own
implementation of commons logging and 2) you have a classloading issue where
classes in the parent classloader cannot "see" the Log interface that was
loaded by your application (parents cannot reference classes loaded by
children in the tree). In the normal PARENT_FIRST configuration, this class
would be loaded by one of the parent classloaders.

I recommend one of the following:

1) run in PARENT_FIRST config and remove commons logging from your
application (so that you use WAS' version instead).
2) use a different logging façade, such as SLF4J that doesn't conflict with
commons logging.


Brennan Spies
Sr. Programmer Analyst

-----Original Message-----
From: Nitin Aurora [mailto:nitin_aurora@hotmail.com] 
Sent: Friday, April 25, 2008 9:23 AM
To: user@commons.apache.org
Subject: [Logging] Log4jLogger does not implement Log error in Websphere
6.1.0.15 environment




Hi, I can't seem to start my application when using Commons-logging-1.1.jar.
I am running the application in Websphere 6.1.0.15 environment in RAD 7. The
application (ear) class loader mode is PARENT_LAST with Application as the
WAS classloader mode. It seems like the commons-logging  jar and properties
file in my application is getting loaded but then the server tries to bind
the Logfactory from the application classloader to the Log interface in the
Websphere runtime jar (com.ibm.ws.runtime_6.1.0.jar) and I believe thats what
triggers the following error --  """[4/25/08 10:22:35:437 CDT] 0000000a
SystemErr R Caused by: org.apache.commons.logging.LogConfigurationException:
Class org.apache.commons.logging.impl.Log4JLogger does not implement Log  at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryIm
pl.java:412)  at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.jav
a:525)  at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.jav
a:272)  at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.jav
a:246)  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
at
com.ibm.ws.webservices.custom.CustomPropertyProviderImpl.(CustomPropertyProvi
derImpl.java:45)  at
com.ibm.ws.webservices.custom.CustomPropertyProviderFactory.(CustomPropertyPr
oviderFactory.java:29)  at java.lang.J9VMInternals.initializeImpl(Native
Method)  at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)  at
com.ibm.ws.webservices.tools.resource.DefaultToolEnv.(DefaultToolEnv.java:70)
at java.lang.J9VMInternals.initializeImpl(Native Method)  at
java.lang.J9VMInternals.initialize(J9VMInternals.java:177)  at
com.ibm.ws.webservices.tools.WSDLQuery.(WSDLQuery.java:119)  at
com.ibm.ws.webservices.tools.WSDLQuery.(WSDLQuery.java:103)  at
com.ibm.ws.webservices.engine.deployment.wsdd.WSDDGen.getWSDLQuery(WSDDGen.ja
va:178)  at
com.ibm.ws.webservices.engine.deployment.wsdd.WSDDPort.expand(WSDDPort.java:5
31)  at
com.ibm.ws.webservices.engine.deployment.wsdd.WSDDPort._initTMR(WSDDPort.java
:308)  at
com.ibm.ws.webservices.component.WSServerImpl.setupWsddPort(WSServerImpl.java
:1126)  at
com.ibm.ws.webservices.component.WSServerImpl.warMetaDataCreated(WSServerImpl
.java:1904)  at
com.ibm.ws.webservices.component.WSServerImpl.metaDataCreated(WSServerImpl.ja
va:530)  at
com.ibm.ws.runtime.component.MetaDataMgrImpl.fireMetaDataCreated(MetaDataMgrI
mpl.java:188)  at
com.ibm.ws.webcontainer.metadata.WebMetaDataFactory.createMetaData(WebMetaDat
aFactory.java:205)  at
com.ibm.ws.runtime.component.MetaDataMgrImpl.createMetaDataFromFactories(Meta
DataMgrImpl.java:172)  at
com.ibm.ws.runtime.component.MetaDataMgrImpl.createMetaData(MetaDataMgrImpl.j
ava:306)  at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java
:563)  at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicatio
nImpl.java:817)  at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationM
grImpl.java:949)  at
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicatio
nMgrImpl.java:2122)  at
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComp
onentImpl.java:342)  at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) """    I dont
understand why the log interface in the runtime jar is being used to bind the
Log4jLogger...(if that is the case)...  Thanks, Nitin
_________________________________________________________________Spell a
grand slam in this game where word skill meets World Series. Get in the
game.http://club.live.com/word_slugger.aspx?icid=word_slugger_wlhm_admod_apri
l08
_________________________________________________________________
Make i'm yours.  Create a custom banner to support your cause.
http://im.live.com/Messenger/IM/Contribute/Default.aspx?source=TXT_TAGHM_MSN_
Make_IM_Yours

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message