aspose file tools*
The moose likes Object Relational Mapping and the fly likes Spring / Hibernate Logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Spring / Hibernate Logging" Watch "Spring / Hibernate Logging" New topic
Author

Spring / Hibernate Logging

Edgar Castanedo
Greenhorn

Joined: May 15, 2003
Posts: 23
Since I think this is a Hibernate thing, I will post here. Sorry if it's in the wrong place.

So I created a web application which uses Spring and Hibernate. During every hibernate call, there is some log data being sent to standard out which I do not want.

Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:

Now imagine this like a few hundred times in your log file. Does anyone know why and how I can disable this??? I am pretty sure this is Hibernate as it wasn't happening until I integrated Hibernate.

HELP!!!

Thanks in Advance!!!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Hibernate uses Commons Logging to control its log messages. It logs at INFO level by default, so there must be a configuration somewhere else in your application which is asking for log levels at TRACE. Look at the class the log method is being made from (should be included in the log message) - is it a Hibernate class? It depends which logging framework you are using as to where a config. file will be, if its log4j then log4j.properties will be on your classpath somewhere. If its JDK logging its JAVA_HOME/jre/lib/logging.properties.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Edgar Castanedo
Greenhorn

Joined: May 15, 2003
Posts: 23
Thanks for the info. It looks like my app is using standard JDK logging. I tried to implement log4j, but was not succesful. I tried to add the log4j jar file in my WEB-INF/lib and my Spring Beans would not load any longer. Tomcat complains that it could not find the bean classes. I am assuming some library that log4j uses is breaking down which may be caused by some CLASSPATH issues introduced when I added log4j. Does this make sense? Anybody ever deal with this issue?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring / Hibernate Logging
 
Similar Threads
WTRN0031E: Error to recover XAResource:
calendar
Websphere security -- SOAP signatures -- Redbook webbank example
WAS failed to start
Error 500 while accessing jsp