Even though iBATIS 2.1.5 is not dependant on JCL, it will use JCL if it finds it in the classpath. WebSphere supplies JCL in the application server classpath. QED - iBATIS running on WebSphere will always use JCL for logging.
Adding log4j to the WEB-INF\lib directory has no effect (as you well know by now). The web application classloader is a child of the application server classloader so iBATIS will always find JCL before it finds log4j.
Configuring logging on WebSphere is a little tricky - this article from the WebSphere information center would be a good start for your research:
Hope that helps -
Jeff Butler
On 8/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Prashanth,
I've tried to remove all "unnecessary" lines from the log4j.properties file
but nothing changed.
At the moment this is my configuration:
*** LIBs in project classpath ***
- commons-logging-api.jar
- commons-logging.jar
- log4j.1.2.11.jar
*** log4j.properties file ***
# Global logging configuration
log4j.rootLogger=DEBUG, stdout, DAILY_FILE
# for ibatis
# SqlMap logging configuration...
log4j.logger.com.ibatis=DEBUG
log4j.logger.java.sql=DEBUG
# Console output
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%p [%d] [%t] [%c{1}] [%F:%L]
- %m%n
#
# DAILY_FILE is a DailyFileAppender
#
log4j.appender.DAILY_FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DAILY_FILE.File=C:\\logging\\log4j.log
log4j.appender.DAILY_FILE.DatePattern='.'yyyy-MM-dd
log4j.appender.DAILY_FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.DAILY_FILE.layout.ConversionPattern=%-5p %d{ISO8601}: %c.%M()
: %m%n
I've not used any "Configurator" anywhere (esplicitly), perhaps I'm using
some kind of default.
Still having logs from "my" code but no logs from iBatis. The same configuration
worked fine on Eclipse with TomCat5 but on this IBM environment (Rational
+ WebSphere5 AS) it doesn't behave the same.
If I find some different configuration/solution I'll let you know.
Rgrds
Max