You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Raul Davidovich <r....@dmci.eu.com> on 2007/12/06 18:06:46 UTC

Problem with JCL, Log4J and Websphere (JCL diagnostic traces provided)

Hello,

I'm trying to have JCL working with Log4J on Websphere 6.0.2. I followed
all the different setup instructions, but still doesn't work.

I run the JCL diagnostics, and it seems that my config file is seen and
loaded, but, the logger being used is still websphere's own.

Here are the diagnotics traces:


[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Extension
directories (java.ext.dir): null
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Application
classpath (java.class.path):
D:\IBM\WebSphere\ID\6.0\pf\wps/properties;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/properties;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/bootstrap.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/j2ee.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/lmproxy.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/urlprotocols.jar
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Class
org.apache.commons.logging.LogFactory was loaded via classloader
com.ibm.ws.classloader.CompoundClassLoader@549279427
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Ancestry of
classloader which loaded org.apache.commons.logging.LogFactory is
com.ibm.ws.classloader.CompoundClassLoader@549279427 == '
com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
   Local ClassPath:
D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
   Delegation Mode: PARENT_LAST'
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Ancestry of
classloader which loaded org.apache.commons.logging.LogFactory is
ClassLoader tree:com.ibm.ws.classloader.CompoundClassLoader@549279427 -->
com.ibm.ws.classloader.ProtectionClassLoader@1599903430 -->
com.ibm.ws.bootstrap.ExtClassLoader@2013533890 -->
sun.misc.Launcher$AppClassLoader@2014549698 (SYSTEM)  -->
sun.misc.Launcher$ExtClassLoader@2015336130 --> BOOT
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] BOOTSTRAP COMPLETED
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] LogFactory
implementation requested for the first time for context classloader
com.ibm.ws.classloader.CompoundClassLoader@549279427
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP]
com.ibm.ws.classloader.CompoundClassLoader@549279427 == '
com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
   Local ClassPath:
D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
   Delegation Mode: PARENT_LAST'
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] ClassLoader
tree:com.ibm.ws.classloader.CompoundClassLoader@549279427 -->
com.ibm.ws.classloader.ProtectionClassLoader@1599903430 -->
com.ibm.ws.bootstrap.ExtClassLoader@2013533890 -->
sun.misc.Launcher$AppClassLoader@2014549698 (SYSTEM)  -->
sun.misc.Launcher$ExtClassLoader@2015336130 --> BOOT
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
file found at
'jar:file:/D:/IBM/WebSphere/ID/6.0/runtimes/bi_v6/lib/ws-commons-logging.jar!/commons-logging.properties'
with priority 0.0
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
file at
'file:/D:/workspace_wid/LoggingTest/ejbModule/commons-logging.properties'
with priority 10.0 overrides file at
'jar:file:/D:/IBM/WebSphere/ID/6.0/runtimes/bi_v6/lib/ws-commons-logging.jar!/commons-logging.properties'
with priority 0.0
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
file of name 'commons-logging.properties' found at
'file:/D:/workspace_wid/LoggingTest/ejbModule/commons-logging.properties"
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking for
system property [org.apache.commons.logging.LogFactory] to define the
LogFactory subclass to use...
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] No system
property [org.apache.commons.logging.LogFactory] defined.
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking for
a resource file of name
[META-INF/services/org.apache.commons.logging.LogFactory] to define the
LogFactory subclass to use...
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] No resource
file with name 'META-INF/services/org.apache.commons.logging.LogFactory'
found.
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking in
properties file for entry with key 'org.apache.commons.logging.LogFactory'
to define the LogFactory subclass to use...
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
file specifies LogFactory subclass
'org.apache.commons.logging.impl.LogFactoryImpl'
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] Loaded class
org.apache.commons.logging.impl.LogFactoryImpl from classloader
com.ibm.ws.classloader.CompoundClassLoader@549279427
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O
[LogFactoryImpl@1935824596 from
com.ibm.ws.classloader.CompoundClassLoader@549279427] Instance created.
[06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
com.ibm.ws.classloader.CompoundClassLoader@549279427] Created object
org.apache.commons.logging.impl.LogFactoryImpl@1935824596 to manage
classloader com.ibm.ws.classloader.CompoundClassLoader@549279427
[06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
com.ibm.ws.logging.WsLogger
[06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
com.ibm.ws.bootstrap.ExtClassLoader@780416c2
[06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
   Local ClassPath:
D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
   Delegation Mode: PARENT_LAST




Any help will be greatly appreciated.


Kind Regards,

Raul


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


Re: Problem with JCL, Log4J and Websphere (JCL diagnostic traces provided)

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Websphere is a nightmare when it comes to its classloader (a little 
better in the 6.x branch than 5.x, but still)... horrendously complex 
and often the source of all sorts of problems.  I'd suspect that's 
what's going on here before anything else.

But, it looks like you're using parent_last at the EAR level, which is 
what you should be using... also, make sure your WAR's classloader 
policy is Application.

If none of this works, randomly change the classloader settings until it 
works :)  That sounds like a joke, but seriously, with Websphere, that 
might be your best bet!

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
  (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

Raul Davidovich wrote:
> Hello,
> 
> I'm trying to have JCL working with Log4J on Websphere 6.0.2. I followed
> all the different setup instructions, but still doesn't work.
> 
> I run the JCL diagnostics, and it seems that my config file is seen and
> loaded, but, the logger being used is still websphere's own.
> 
> Here are the diagnotics traces:
> 
> 
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Extension
> directories (java.ext.dir): null
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Application
> classpath (java.class.path):
> D:\IBM\WebSphere\ID\6.0\pf\wps/properties;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/properties;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/bootstrap.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/j2ee.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/lmproxy.jar;D:\IBM\WebSphere\ID\6.0\runtimes\bi_v6/lib/urlprotocols.jar
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Class
> org.apache.commons.logging.LogFactory was loaded via classloader
> com.ibm.ws.classloader.CompoundClassLoader@549279427
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Ancestry of
> classloader which loaded org.apache.commons.logging.LogFactory is
> com.ibm.ws.classloader.CompoundClassLoader@549279427 == '
> com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
>    Local ClassPath:
> D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
>    Delegation Mode: PARENT_LAST'
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [ENV] Ancestry of
> classloader which loaded org.apache.commons.logging.LogFactory is
> ClassLoader tree:com.ibm.ws.classloader.CompoundClassLoader@549279427 -->
> com.ibm.ws.classloader.ProtectionClassLoader@1599903430 -->
> com.ibm.ws.bootstrap.ExtClassLoader@2013533890 -->
> sun.misc.Launcher$AppClassLoader@2014549698 (SYSTEM)  -->
> sun.misc.Launcher$ExtClassLoader@2015336130 --> BOOT
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] BOOTSTRAP COMPLETED
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] LogFactory
> implementation requested for the first time for context classloader
> com.ibm.ws.classloader.CompoundClassLoader@549279427
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP]
> com.ibm.ws.classloader.CompoundClassLoader@549279427 == '
> com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
>    Local ClassPath:
> D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
>    Delegation Mode: PARENT_LAST'
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] ClassLoader
> tree:com.ibm.ws.classloader.CompoundClassLoader@549279427 -->
> com.ibm.ws.classloader.ProtectionClassLoader@1599903430 -->
> com.ibm.ws.bootstrap.ExtClassLoader@2013533890 -->
> sun.misc.Launcher$AppClassLoader@2014549698 (SYSTEM)  -->
> sun.misc.Launcher$ExtClassLoader@2015336130 --> BOOT
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
> file found at
> 'jar:file:/D:/IBM/WebSphere/ID/6.0/runtimes/bi_v6/lib/ws-commons-logging.jar!/commons-logging.properties'
> with priority 0.0
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
> file at
> 'file:/D:/workspace_wid/LoggingTest/ejbModule/commons-logging.properties'
> with priority 10.0 overrides file at
> 'jar:file:/D:/IBM/WebSphere/ID/6.0/runtimes/bi_v6/lib/ws-commons-logging.jar!/commons-logging.properties'
> with priority 0.0
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
> file of name 'commons-logging.properties' found at
> 'file:/D:/workspace_wid/LoggingTest/ejbModule/commons-logging.properties"
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking for
> system property [org.apache.commons.logging.LogFactory] to define the
> LogFactory subclass to use...
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] No system
> property [org.apache.commons.logging.LogFactory] defined.
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking for
> a resource file of name
> [META-INF/services/org.apache.commons.logging.LogFactory] to define the
> LogFactory subclass to use...
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] No resource
> file with name 'META-INF/services/org.apache.commons.logging.LogFactory'
> found.
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Looking in
> properties file for entry with key 'org.apache.commons.logging.LogFactory'
> to define the LogFactory subclass to use...
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] [LOOKUP] Properties
> file specifies LogFactory subclass
> 'org.apache.commons.logging.impl.LogFactoryImpl'
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] Loaded class
> org.apache.commons.logging.impl.LogFactoryImpl from classloader
> com.ibm.ws.classloader.CompoundClassLoader@549279427
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O
> [LogFactoryImpl@1935824596 from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] Instance created.
> [06/12/07 16:52:26:079 GMT] 00000012 SystemOut     O [LogFactory from
> com.ibm.ws.classloader.CompoundClassLoader@549279427] Created object
> org.apache.commons.logging.impl.LogFactoryImpl@1935824596 to manage
> classloader com.ibm.ws.classloader.CompoundClassLoader@549279427
> [06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
> com.ibm.ws.logging.WsLogger
> [06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
> com.ibm.ws.bootstrap.ExtClassLoader@780416c2
> [06/12/07 16:52:26:251 GMT] 00000012 SystemOut     O
> com.ibm.ws.classloader.CompoundClassLoader@20bd56c3
>    Local ClassPath:
> D:\workspace_wid\LoggingTest\ejbModule;D:\workspace_wid\LoggingTestClient\bin;D:\workspace_wid\LoggingTestEAR\log4j-1.2.15.jar;D:\workspace_wid\LoggingTestEAR\commons-logging-1.1.1.jar
>    Delegation Mode: PARENT_LAST
> 
> 
> 
> 
> Any help will be greatly appreciated.
> 
> 
> Kind Regards,
> 
> Raul
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 
> 
> 


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