AW: AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread Bender Heri
Hibernate uses the commons-logging framework. Your list of jars does not 
include the commons-logging.jar. I guess that hibernate when loaded the first 
time finds the commons-logging of the tomcat root libraries and initializes 
there, where your special logger is not found. Include a commons-logging.jar 
into your lib and there you go
Heri

-Ursprüngliche Nachricht-
Von: John2000 [mailto:johnk...@gmail.com] 
Gesendet: Montag, 16. November 2009 15:30
An: log4j-user@logging.apache.org
Betreff: Re: AW: Log4j.xml setting for Hibernate not working


Yes I have only log4j.xml. No other file in class path:( And my file is being 
taken bcaz it creates hibernate.log file but it remains empty.

I also tried to removing log settings in hibernate.cfg.xml but in no luck.

I have these jars in WEB-INF\lib

09/02/2009  08:10 PM62,394 activation.jar
08/31/2009  11:27 AM 2,631,190 activemq-all-5.2.0.jar
09/10/2009  11:05 AM   435,564 antlr-2.7.5.jar
09/02/2009  08:11 PM26,361 asm-1.5.3.jar
10/21/2009  12:12 PM29,002 avaya-logging-client-1.0.jar
09/02/2009  08:11 PM   605,581 c3p0-0.9.1-pre11.jar
10/05/2009  10:45 AM   322,362 cglib-nodep-2.2.jar
09/02/2009  08:11 PM   175,426 commons-collections-2.1.1.jar
07/19/2008  03:51 AM   214,796 commons-httpclient.jar
09/02/2009  08:10 PM87,077 commons-pool-1.4.jar
09/02/2009  08:11 PM   313,898 dom4j-1.6.1.jar
09/02/2009  08:11 PM   236,115 ehcache-1.3.0.jar
09/10/2009  11:02 AM   410,878 exchange.jar
09/02/2009  08:10 PM   287,960 FastInfoset.jar
09/02/2009  08:11 PM 1,971,632 hibernate3.jar
09/02/2009  08:10 PM79,619 http.jar
08/06/2009  10:14 PM   289,954 httpclient-4.0.jar
09/02/2009  08:10 PM89,193 jaxb-api.jar
09/02/2009  08:11 PM   844,121 jaxb-impl.jar
09/02/2009  08:11 PM 3,090,959 jaxb-xjc.jar
09/02/2009  08:11 PM35,914 jaxws-api.jar
09/02/2009  08:11 PM 1,266,110 jaxws-rt.jar
09/02/2009  08:11 PM   502,816 jaxws-tools.jar
08/31/2009  11:27 AM25,998 jms.jar
09/02/2009  08:11 PM23,246 jsr173_api.jar
09/02/2009  08:11 PM 7,956 jsr181-api.jar
09/02/2009  08:11 PM 5,948 jsr250-api.jar
08/05/2009  01:08 PM   391,834 log4j-1.2.15.jar
09/02/2009  08:11 PM   371,264 mail.jar
11/02/2009  11:32 AM   320,677 MessageAPIs-20091102.jar
10/29/2009  04:50 PM44,809 messageEventSystemStub.jar
09/02/2009  08:11 PM38,240 mimepull.jar
09/24/2009  11:50 AM   723,660 mysql-connector-java-5.1.8-bin.jar
09/02/2009  08:11 PM66,786 resolver.jar
09/02/2009  08:11 PM18,623 saaj-api.jar
09/02/2009  08:11 PM   273,722 saaj-impl.jar
10/26/2009  01:55 PM85,287 servlet-api.jar
09/02/2009  08:11 PM   330,222 sjsxp.jar
09/02/2009  08:11 PM10,958 stax-ex.jar
09/02/2009  08:11 PM57,250 streambuffer.jar
  40 File(s) 16,805,402 bytes
   2 Dir(s)  52,573,892,608 bytes free

--John


Bender Heri wrote:
 
 Are you sure that your log configuration file is picked up? Maybe 
 there is annother config file on the class path which is used before 
 yours is found.
 I have no problems on Tomcat with special hibernate loggers.
 Heri
 
 -Ursprüngliche Nachricht-
 Von: John2000 [mailto:johnk...@gmail.com]
 Gesendet: Montag, 16. November 2009 12:57
 An: log4j-user@logging.apache.org
 Betreff: Log4j.xml setting for Hibernate not working
 
 
 We are using log4j.xml for logging. Everything is working fine except 
 hibernet logging. All logs files are crated but for hibernate only log 
 file is created and it remains empty.
 
 My log4j.xml settings are
 
 appender name=HIBERNATELOG 
 class=org.apache.log4j.RollingFileAppender
 
 
 
 
 
 layout
 class=com.common.logging.client.CommonLoggingLayout
   
   
 /layout
 /appender
 
 
 
 logger name=org.hibernate additivity=false
   level value=DEBUG/
   appender-ref ref=HIBERNATELOG/ /logger
 
 
 here ../log/hibernate.log file is created in tomcat but nothing after 
 that.
 I can see logs on console and in cataline.out file.
 
 Please help.
 
 Thanks in advance.
 
 --
 View this message in context:
 http://old.nabble.com/Log4j.xml-setting-for-Hibernate-not-working-tp26
 370675p26370675.html Sent from the Log4j - Users mailing list archive 
 at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org
 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr

Re: AW: AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread John2000

Thanks a lot Heri. 

I added jars and that solved the problem.

thanks again.


Bender Heri wrote:
 
 Hibernate uses the commons-logging framework. Your list of jars does not
 include the commons-logging.jar. I guess that hibernate when loaded the
 first time finds the commons-logging of the tomcat root libraries and
 initializes there, where your special logger is not found. Include a
 commons-logging.jar into your lib and there you go
 Heri
 
 -Ursprüngliche Nachricht-
 Von: John2000 [mailto:johnk...@gmail.com] 
 Gesendet: Montag, 16. November 2009 15:30
 An: log4j-user@logging.apache.org
 Betreff: Re: AW: Log4j.xml setting for Hibernate not working
 
 
 Yes I have only log4j.xml. No other file in class path:( And my file is
 being taken bcaz it creates hibernate.log file but it remains empty.
 
 I also tried to removing log settings in hibernate.cfg.xml but in no luck.
 
 I have these jars in WEB-INF\lib
 
 09/02/2009  08:10 PM62,394 activation.jar
 08/31/2009  11:27 AM 2,631,190 activemq-all-5.2.0.jar
 09/10/2009  11:05 AM   435,564 antlr-2.7.5.jar
 09/02/2009  08:11 PM26,361 asm-1.5.3.jar
 10/21/2009  12:12 PM29,002 avaya-logging-client-1.0.jar
 09/02/2009  08:11 PM   605,581 c3p0-0.9.1-pre11.jar
 10/05/2009  10:45 AM   322,362 cglib-nodep-2.2.jar
 09/02/2009  08:11 PM   175,426 commons-collections-2.1.1.jar
 07/19/2008  03:51 AM   214,796 commons-httpclient.jar
 09/02/2009  08:10 PM87,077 commons-pool-1.4.jar
 09/02/2009  08:11 PM   313,898 dom4j-1.6.1.jar
 09/02/2009  08:11 PM   236,115 ehcache-1.3.0.jar
 09/10/2009  11:02 AM   410,878 exchange.jar
 09/02/2009  08:10 PM   287,960 FastInfoset.jar
 09/02/2009  08:11 PM 1,971,632 hibernate3.jar
 09/02/2009  08:10 PM79,619 http.jar
 08/06/2009  10:14 PM   289,954 httpclient-4.0.jar
 09/02/2009  08:10 PM89,193 jaxb-api.jar
 09/02/2009  08:11 PM   844,121 jaxb-impl.jar
 09/02/2009  08:11 PM 3,090,959 jaxb-xjc.jar
 09/02/2009  08:11 PM35,914 jaxws-api.jar
 09/02/2009  08:11 PM 1,266,110 jaxws-rt.jar
 09/02/2009  08:11 PM   502,816 jaxws-tools.jar
 08/31/2009  11:27 AM25,998 jms.jar
 09/02/2009  08:11 PM23,246 jsr173_api.jar
 09/02/2009  08:11 PM 7,956 jsr181-api.jar
 09/02/2009  08:11 PM 5,948 jsr250-api.jar
 08/05/2009  01:08 PM   391,834 log4j-1.2.15.jar
 09/02/2009  08:11 PM   371,264 mail.jar
 11/02/2009  11:32 AM   320,677 MessageAPIs-20091102.jar
 10/29/2009  04:50 PM44,809 messageEventSystemStub.jar
 09/02/2009  08:11 PM38,240 mimepull.jar
 09/24/2009  11:50 AM   723,660 mysql-connector-java-5.1.8-bin.jar
 09/02/2009  08:11 PM66,786 resolver.jar
 09/02/2009  08:11 PM18,623 saaj-api.jar
 09/02/2009  08:11 PM   273,722 saaj-impl.jar
 10/26/2009  01:55 PM85,287 servlet-api.jar
 09/02/2009  08:11 PM   330,222 sjsxp.jar
 09/02/2009  08:11 PM10,958 stax-ex.jar
 09/02/2009  08:11 PM57,250 streambuffer.jar
   40 File(s) 16,805,402 bytes
2 Dir(s)  52,573,892,608 bytes free
 
 --John
 
 
 Bender Heri wrote:
 
 Are you sure that your log configuration file is picked up? Maybe 
 there is annother config file on the class path which is used before 
 yours is found.
 I have no problems on Tomcat with special hibernate loggers.
 Heri
 
 -Ursprüngliche Nachricht-
 Von: John2000 [mailto:johnk...@gmail.com]
 Gesendet: Montag, 16. November 2009 12:57
 An: log4j-user@logging.apache.org
 Betreff: Log4j.xml setting for Hibernate not working
 
 
 We are using log4j.xml for logging. Everything is working fine except 
 hibernet logging. All logs files are crated but for hibernate only log 
 file is created and it remains empty.
 
 My log4j.xml settings are
 
 appender name=HIBERNATELOG 
 class=org.apache.log4j.RollingFileAppender
 
 
 
 
 
 layout
 class=com.common.logging.client.CommonLoggingLayout
   
   
 /layout
 /appender
 
 
 
 logger name=org.hibernate additivity=false
  level value=DEBUG/
  appender-ref ref=HIBERNATELOG/ /logger
 
 
 here ../log/hibernate.log file is created in tomcat but nothing after 
 that.
 I can see logs on console and in cataline.out file.
 
 Please help.
 
 Thanks in advance.
 
 --
 View this message in context:
 http://old.nabble.com/Log4j.xml-setting-for-Hibernate-not-working-tp26
 370675p26370675.html Sent from the Log4j - Users mailing list archive 
 at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail