ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <dhsc...@cstone.dhs.state.il.us>
Subject Re: Log4j question
Date Fri, 18 Feb 2005 15:21:02 GMT
Another thing to remember is the WebSphere itself uses commons logging. 
So to get JCL messages when running in WebSphere's JRE, you'll need to
make some modifications to the WebSphere configuration.  This could be
why things work one way in a main method (not running in WebSphere's
JRE), and a different way in a JSP (which is running in WebSphere's

Here's an article that explains the process:


Some have reported that this is still necessary on WAS 6.x, but I've
not verified that myself.

Jeff Butler

>>> mgivney@hotmail.com 2/14/2005 10:19:51 AM >>>
Hi folks,

Great product, thanks for all your hard work!

Question about logging what the framework is doing when running an app
WebSphere. I have written and tested code using a simple datasource and

running from my main method and I get the War & Peace style logging

Though when I transfer the same code to a JSP, and switch my datasource
SIMPLE to JNDI, I don't get anything. Any ideas what I am doing wrong?

Here's a copy of my log4j properties file:

# Global logging configuration
log4j.rootLogger=DEBUG, stdout

# Console output...
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

And here's the code from the JSP:

   SqlMapClient client = SQLMapConfig.getSqlMapInstance();
   List list = client.queryForList("getBrandCodes", null );

   if ( list.size() > 0 )
     System.out.println( "It worked!");

}catch( Exception exception ){

View raw message