You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dilip Shah <di...@hotmail.com> on 2012/04/19 18:25:34 UTC

catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

My Java application (Spring, Hibernate, MySQL) is running in Tomcat 5.5

After the last set of changes to my application, Tomcat's catalina.out file is growing very rapidly. With each query it adds a few MBs of INFO and DEBUG statements to the file.

The log file has very large number of INFO and DEBUG statements such as the following:
01:52:45.412 [main] INFO  o.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
01:52:45.465 [main] INFO  org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
01:52:45.468 [main] INFO  org.hibernate.cfg.Environment - hibernate.properties not found
01:52:45.473 [main] INFO  org.hibernate.cfg.Environment - Bytecode provider name : javassist
01:52:45.479 [main] INFO  org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
01:52:45.629 [main] DEBUG o.h.i.f.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid] -> [class org.hibernate.id.UUIDHexGenerator]
01:52:45.635 [main] DEBUG o.h.i.f.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [hilo] -> [class org.hibernate.id.TableHiLoGenerator]
01:52:45.636 [main] DEBUG o.h.i.f.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [assigned] -> [class org.hibernate.id.Assigned]
01:52:45.639 [main] DEBUG o.h.i.f.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [identity] -> [class org.hibernate.id.IdentityGenerator]
01:52:45.640 [main] DEBUG o.h.i.f.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [select] -> [class org.hibernate.id.SelectGenerator]

01:52:45.668 [main] INFO  o.h.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
01:52:45.719 [main] DEBUG o.h.cfg.AnnotationConfiguration - Execute first pass mapping processing
01:52:45.780 [main] DEBUG o.h.cfg.AnnotationConfiguration - Process hbm files
01:52:45.780 [main] DEBUG o.h.cfg.AnnotationConfiguration - Process annotated classes
01:52:45.791 [main] INFO  org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.knownomy.scl.appcommon.domain.Language
01:52:45.805 [main] INFO  o.h.cfg.annotations.QueryBinder - Binding Named query: language.id => from Language language where language.id = ?
01:52:45.821 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3DiscriminatorColumn{logicalColumnName'DTYPE', discriminatorTypeName='string'}
01:52:45.824 [main] DEBUG org.hibernate.cfg.AnnotationBinder - no value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED
01:52:45.843 [main] DEBUG o.h.cfg.annotations.EntityBinder - Import with entity name Language
01:52:45.849 [main] INFO  o.h.cfg.annotations.EntityBinder - Bind entity com.knownomy.scl.appcommon.domain.Language on table language

01:52:50.164 [main] DEBUG o.h.hql.ast.QueryTranslatorImpl - parse() - HQL: from com.knownomy.scl.quiz.domain.Question question where question.chapter.id=? and question.questionSource.id=? and question.mcq.questionText=?
01:52:50.177 [main] DEBUG org.hibernate.hql.ast.AST - --- HQL AST ---
 \-[QUERY] Node: 'query'
    +-[SELECT_FROM] Node: 'SELECT_FROM'
    |  \-[FROM] Node: 'from'
    |     \-[RANGE] Node: 'RANGE'
    |        +-[DOT] Node: '.'
    |        |  +-[DOT] Node: '.'
    |        |  |  +-[DOT] Node: '.'
    |        |  |  |  +-[DOT] Node: '.'
    |        |  |  |  |  +-[DOT] Node: '.'
    |        |  |  |  |  |  +-[IDENT] Node: 'com'
    |        |  |  |  |  |  \-[IDENT] Node: 'knownomy'
    |        |  |  |  |  \-[IDENT] Node: 'scl'
    |        |  |  |  \-[IDENT] Node: 'quiz'
    |        |  |  \-[IDENT] Node: 'domain'
    |        |  \-[IDENT] Node: 'Question'
    |        \-[ALIAS] Node: 'question'
    \-[WHERE] Node: 'where'


Content of log4j.properties:
log4j.rootLogger=INFO, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%5p] %d{yyyy-MM-dd HH:mm:ss} (%F:%M:%L) - %m%n
#log4j.appender.stdout.layout.ConversionPattern=[%5p] %t %d{yyyy-MM-dd HH:mm:ss} (%F:%M:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/SmartCloudLearningMobi.log
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%5p] %d{yyyy-MM-dd HH:mm:ss} (%F:%M:%L) - %m%n
#log4j.appender.R.layout.ConversionPattern=[%5p] %t %d{yyyy-MM-dd HH:mm:ss} (%F:%M:%L) - %m%n

log4j.logger.org.hibernate=ERROR, stdout, R

### log HQL parse trees  
log4j.logger.org.hibernate.hql=ERROR, stdout, R

### Log HQL and SQL ASTs during query parsing ###  
log4j.logger.org.hibernate.hql.ast.AST=ERROR, stdout, R
log4j.additivity.org.hibernate.hql.ast.AST=false

### log just the SQL  
log4j.logger.org.hibernate.SQL=ERROR, stdout, R
log4j.additivity.org.hibernate.SQL=false

### log JDBC bind parameters. Very userfull, when debug parameterized queries ###  
log4j.logger.org.hibernate.type=ERROR, stdout, R
log4j.additivity.org.hibernate.type=false

### log schema export/update ###
log4j.logger.org.hibernate.tool.hbm2ddl=ERROR, stdout, R

### log cache activity ###
log4j.logger.org.hibernate.cache=ERROR, stdout, R

### log transaction activity  
log4j.logger.org.hibernate.transaction=ERROR, stdout, R

### Log all JDBC resource acquisition  
log4j.logger.org.hibernate.jdbc=ERROR, stdout, R

### enable the following line if you want to track down connection ###  
### leakages when using DriverManagerConnectionProvider ###  
log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=ERROR, stdout, R

log4j.logger.org.hibernate.cfg=ERROR, stdout, R


log4j.logger.org.springframework=ERROR, stdout, R
log4j.logger.org.springframework.test.context.junit4.SpringJUnit4ClassRunner=ERROR, stdout, R


Content of application.properties file:
#  Application Properties
path.webinf=webapps/SmartCloudLearningMobi/WEB-INF
# JDBC Connection information
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/databasename?useUnicode=true&characterEncoding=UTF8
jdbc.username=root
jdbc.password=mypassword
###hibernate
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.c3p0.min_size=1
hibernate.c3p0.max_size=25
hibernate.c3p0.acquire_increment=5
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
hibernate.c3p0.idle_test_period=3600

In the last change, I removed the following jar file:
ejb3-persistance.jar

and added the following jar files:
aspectjtools-1.5.4.jar
bval-core-0.3-incubating.jar
hibernate-validator-4.1.0.Final.jar
jackson-core-asl-1.6.4.jar
jackson-mapper-asl-1.6.4.jar
joda-time-1.6.2.jar
joda-time-jsptags-1.0.2.jar
jstl-1.2.jar
validation-api-1.0.0.GA.jar

I've been struggling with this for 2+ days!

I asked this question on a couple of other forums but that hasn't helped me solve this issue.
StackOverflow: http://stackoverflow.com/questions/10196154/tomcat-catalina-out-file-is-growing-very-rapidly-how-to-prevent-hibernates-inf
Hibernate: https://forum.hibernate.org/viewtopic.php?f=1&t=1015204

Could someone tell me how to prevent these Hibernate's INFO and DEBUG statements from getting added to catalina.out file? Much appreciated.

Dilip

Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/4/20 Dilip Shah <di...@hotmail.com>:
> Hi Konstantin,
>
> I checked all the jar files I added to common/lib and none of them have
> log4j.properties file at the root location.
>


The log4j.properties that you cited in your first mail - it is in your
app's WEB-INF/classes?

Where is log4j**.jar ? Is there one copy of it, or several?

Do you have log4j.properties in Tomcat's common/classes?


Are any log files created in the logs folder, or everything is written
to the console (that is catalina.out) ?

Try changing log format in your log4j.properties file  -- to make sure
that it is this file that has control and not some default elsewhere.

BTW, log4j project:
http://logging.apache.org/log4j/

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

Posted by Dilip Shah <di...@hotmail.com>.
Hi Konstantin,

I checked all the jar files I added to common/lib and none of them have 
log4j.properties file at the root location.

I get your suggestion on putting application specific jar files in the 
application's WEB-INF/lib folder... I'll go ahead and take care of it.

The application's web.xml:
====================
<web-app
	id="WebApp_ID"
	version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	>

	<display-name>Smart Cloud Learning</display-name>
	<description>Smart Cloud Learning Application</description>

	<!-- The front controller of this Spring Web application,
		responsible for handling all application requests -->
	<servlet>
		<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/applicationContext.xml</param-value>
		</init-param>
	</servlet>

	<!-- Map all spring/* requests to the DispatcherServlet for handling -->
	<servlet-mapping>
		<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
		<url-pattern>/rest/*</url-pattern>
	</servlet-mapping>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
</web-app>


applicationContext.xml:
=================
<beans
	xmlns="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
		http://www.springframework.org/schema/tx
		http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
        ">

	<context:component-scan base-package="com.knownomy.scl">
	     <context:include-filter type="aspectj" expression="com.knownomy.scl.*" 
/>
	</context:component-scan>

	<mvc:annotation-driven />

	<!-- START Load application properties -->
	<bean id="propertyConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property 
name="location"><value>WEB-INF/application.properties</value></property>
	</bean>

	<!-- Data source configuration -->
	<bean
		id="dataSource"
		class="com.mchange.v2.c3p0.ComboPooledDataSource">
		<property
			name="driverClass"
			value="${jdbc.driverClassName}"/>
		<property
			name="jdbcUrl"
			value="${jdbc.url}"/>
		<property
			name="user"
			value="${jdbc.username}"/>
		<property
			name="password"
			value="${jdbc.password}"/>
		<property
			name="minPoolSize">
			<value>${hibernate.c3p0.min_size}</value>
			</property>
		<property
			name="maxPoolSize">
			<value>${hibernate.c3p0.max_size}</value>
			</property>
		<property
			name="acquireRetryAttempts">
			<value>10</value>
			</property>
		<property
			name="acquireIncrement">
			<value>${hibernate.c3p0.acquire_increment}</value>
			</property>
		<property
			name="idleConnectionTestPeriod">
			<value>${hibernate.c3p0.idle_test_period}</value>
			</property>
		<property
			name="maxIdleTime">
			<value>${hibernate.c3p0.timeout}</value>
			</property>
		<property
			name="preferredTestQuery">
			<value>SELECT 1</value>
			</property>
		<property
			name="testConnectionOnCheckin">
			<value>false</value>
			</property>
	</bean>

	<!-- START HIBERNATE CONFIG -->
	<!-- Configure SessionFactory -->
	<bean
		id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property
			name="dataSource"
			ref="dataSource" />
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
				<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
				<prop 
key="hibernate.transaction.factory_class">${hibernate.transaction.factory_class}</prop>
				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
				<prop key="hibernate.c3p0.min_size">${hibernate.c3p0.min_size}</prop>
				<prop key="hibernate.c3p0.max_size">${hibernate.c3p0.max_size}</prop>
				<prop 
key="hibernate.c3p0.acquire_increment">${hibernate.c3p0.acquire_increment}</prop>
				<prop key="hibernate.c3p0.timeout">${hibernate.c3p0.timeout}</prop>
				<prop 
key="hibernate.c3p0.max_statements">${hibernate.c3p0.max_statements}</prop>
				<prop 
key="hibernate.c3p0.idle_test_period">${hibernate.c3p0.idle_test_period}</prop>
			</props>
		</property>

		<property name="annotatedClasses">
			<list>
				<value>com.knownomy.scl.appcommon.domain.Language</value>
				<value>com.knownomy.scl.appcommon.domain.Syllabus</value>
				<value>com.knownomy.scl.appcommon.domain.Country</value>
				<value>com.knownomy.scl.appcommon.domain.State</value>
				<value>com.knownomy.scl.appcommon.domain.Grade</value>
				<value>com.knownomy.scl.appcommon.domain.Subject</value>
				<value>com.knownomy.scl.appcommon.domain.EmbeddedImage</value>
				<value>com.knownomy.scl.appcommon.domain.PageSetup</value>

			</list>
		</property>

	</bean>

	<!-- enable the configuration of transactional behavior based on 
annotations -->
	<tx:annotation-driven transaction-manager="txManager"/>

	<bean id="txManager" 
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory"><ref local="sessionFactory"/></property>
	</bean>

	<bean 
class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor"/>
	<!-- END HIBERNATE CONFIG -->
</beans>


application.properties:
=================
#  Application Properties
path.webinf=webapps/SmartCloudLearningMobi/WEB-INF
# JDBC Connection information
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/databasename?useUnicode=true&characterEncoding=UTF8
jdbc.username=root
jdbc.password=mypassword
###hibernate
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.c3p0.min_size=1
hibernate.c3p0.max_size=25
hibernate.c3p0.acquire_increment=5
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
hibernate.c3p0.idle_test_period=3600

Thanks,

Dilip

--------------------------------------------------
From: "Konstantin Kolinko" <kn...@gmail.com>
Sent: Thursday, April 19, 2012 3:21 PM
To: "Tomcat Users List" <us...@tomcat.apache.org>
Subject: Re: catalina.out file is growing very rapidly! How to prevent 
Hibernate's INFO and DEBUG statements from getting added to catalina.out 
file?

> 2012/4/20 Dilip Shah <di...@hotmail.com>:
>> Hi Konstantin,
>>
>> Thanks for the reply!
>>
>> To answer your questions...
>> * Tomcat version info:
>> Server version: Apache Tomcat/5.5.28
>> Server built:   Jul 24 2009 01:33:09
>> Server number:  5.5.28.0
>> OS Name:        Linux
>> OS Version:     2.6.18-53.el5
>> Architecture:   i386
>> JVM Version:    1.6.0_23-ea-b01
>>
>> * Since I'm configuring the application's logging via log4j.properties, I
>> can safely assume that logging is done via Log4j and not JULI, right?
>> Your statement about log formatting also seems to suggest the same. Let 
>> me
>> know if I interpreted your statement incorrectly.
>
> OK.
> The problem is that something configured logging for you  (e.g. by
> providing its own copy of configuration file).
>
> One example of such bad library is mentioned here:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52011
>
> IIRC Log4j supports 2 configuration file names: log4j.properties and
> log4j.xml. See Log4J documentation for details.
>
> Search whether some of jars that you added has such a file. If they
> are in commons/lib it means that Tomcat sees them.
>
>>
>> * The changes I made to the application:
>> - I implemented Spring view controller (for the first time) and in the
>> process added @Autowired, @JsonIgnore through the code
>> - in the process of getting jSON output to the client, I added the 
>> following
>> jar files to common/lib
>
> Adding them to common/lib is a bad idea (a way to jar hell).
>
> You'd better put them into your app's WEB-INF/lib.
>
>> aspectjtools-1.5.4.jar
>> bval-core-0.3-incubating.jar
>> hibernate-validator-4.1.0.Final.jar
>> jackson-core-asl-1.6.4.jar
>> jackson-mapper-asl-1.6.4.jar
>> joda-time-1.6.2.jar
>> joda-time-jsptags-1.0.2.jar
>> jstl-1.2.jar
>> validation-api-1.0.0.GA.jar
>>
>> I suspect packages in one or more of these jar files is generating these
>> INFO and DEBUG log entries in catalina.out
>>
>> * The application's log4j.properties file is in the application's
>> WEB-INF/classes folder
>>
>
> What is in your configuration file?
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/4/20 Dilip Shah <di...@hotmail.com>:
> Hi Konstantin,
>
> Thanks for the reply!
>
> To answer your questions...
> * Tomcat version info:
> Server version: Apache Tomcat/5.5.28
> Server built:   Jul 24 2009 01:33:09
> Server number:  5.5.28.0
> OS Name:        Linux
> OS Version:     2.6.18-53.el5
> Architecture:   i386
> JVM Version:    1.6.0_23-ea-b01
>
> * Since I'm configuring the application's logging via log4j.properties, I
> can safely assume that logging is done via Log4j and not JULI, right?
> Your statement about log formatting also seems to suggest the same. Let me
> know if I interpreted your statement incorrectly.

OK.
The problem is that something configured logging for you  (e.g. by
providing its own copy of configuration file).

One example of such bad library is mentioned here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=52011

IIRC Log4j supports 2 configuration file names: log4j.properties and
log4j.xml. See Log4J documentation for details.

Search whether some of jars that you added has such a file. If they
are in commons/lib it means that Tomcat sees them.

>
> * The changes I made to the application:
> - I implemented Spring view controller (for the first time) and in the
> process added @Autowired, @JsonIgnore through the code
> - in the process of getting jSON output to the client, I added the following
> jar files to common/lib

Adding them to common/lib is a bad idea (a way to jar hell).

You'd better put them into your app's WEB-INF/lib.

> aspectjtools-1.5.4.jar
> bval-core-0.3-incubating.jar
> hibernate-validator-4.1.0.Final.jar
> jackson-core-asl-1.6.4.jar
> jackson-mapper-asl-1.6.4.jar
> joda-time-1.6.2.jar
> joda-time-jsptags-1.0.2.jar
> jstl-1.2.jar
> validation-api-1.0.0.GA.jar
>
> I suspect packages in one or more of these jar files is generating these
> INFO and DEBUG log entries in catalina.out
>
> * The application's log4j.properties file is in the application's
> WEB-INF/classes folder
>

What is in your configuration file?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

Posted by Dilip Shah <di...@hotmail.com>.
Hi Konstantin,

Thanks for the reply!

To answer your questions...
* Tomcat version info:
Server version: Apache Tomcat/5.5.28
Server built:   Jul 24 2009 01:33:09
Server number:  5.5.28.0
OS Name:        Linux
OS Version:     2.6.18-53.el5
Architecture:   i386
JVM Version:    1.6.0_23-ea-b01

* Since I'm configuring the application's logging via log4j.properties, I 
can safely assume that logging is done via Log4j and not JULI, right?
Your statement about log formatting also seems to suggest the same. Let me 
know if I interpreted your statement incorrectly.

* The changes I made to the application:
- I implemented Spring view controller (for the first time) and in the 
process added @Autowired, @JsonIgnore through the code
- in the process of getting jSON output to the client, I added the following 
jar files to common/lib
aspectjtools-1.5.4.jar
bval-core-0.3-incubating.jar
hibernate-validator-4.1.0.Final.jar
jackson-core-asl-1.6.4.jar
jackson-mapper-asl-1.6.4.jar
joda-time-1.6.2.jar
joda-time-jsptags-1.0.2.jar
jstl-1.2.jar
validation-api-1.0.0.GA.jar

I suspect packages in one or more of these jar files is generating these 
INFO and DEBUG log entries in catalina.out

* The application's log4j.properties file is in the application's 
WEB-INF/classes folder

Your suggestion (CATALINA_OUT=/dev/null) is interesting but the collateral 
damage may be too great!

Let me know if you can think of anything else after getting this additional 
information.

Best wishes,

Dilip



--------------------------------------------------
From: "Konstantin Kolinko" <kn...@gmail.com>
Sent: Thursday, April 19, 2012 10:14 AM
To: "Tomcat Users List" <us...@tomcat.apache.org>
Subject: Re: catalina.out file is growing very rapidly! How to prevent 
Hibernate's INFO and DEBUG statements from getting added to catalina.out 
file?

> 2012/4/19 Dilip Shah <di...@hotmail.com>:
>> My Java application (Spring, Hibernate, MySQL) is running in Tomcat 5.5
>
> What version of 5.5.x ?
>
>>
>> After the last set of changes to my application, Tomcat's catalina.out 
>> file is growing very rapidly. With each query it adds a few MBs of INFO 
>> and DEBUG statements to the file.
>>
>> The log file has very large number of INFO and DEBUG statements such as 
>> the following:
>> 01:52:45.412 [main] INFO  o.hibernate.cfg.annotations.Version - Hibernate 
>> Annotations 3.5.6-Final
>> 01:52:45.465 [main] INFO  org.hibernate.cfg.Environment - Hibernate 
>> 3.5.6-Final
>> 01:52:45.468 [main] INFO  org.hibernate.cfg.Environment - 
>> hibernate.properties not found
>
> Looks like misconfigured Log4J.logging framework.  You are missing
> log4j.properties file somewhere (or you have several such files which
> conflict with each other).
>
> When Tomcat's JULI is used it formats its log statements differently.
>
>> After the last set of changes to my application
>
> And you know what those changes were?
>
> Start over with a fresh configuration.
>
>
> If nothing else helps you may try the following (~joke):
>
> 1. Create file bin/setenv.sh with the following content:
> CATALINA_OUT=/dev/null
>
> 2. Make the file executable.
> 3. Restart Tomcat.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/4/19 Dilip Shah <di...@hotmail.com>:
> My Java application (Spring, Hibernate, MySQL) is running in Tomcat 5.5

What version of 5.5.x ?

>
> After the last set of changes to my application, Tomcat's catalina.out file is growing very rapidly. With each query it adds a few MBs of INFO and DEBUG statements to the file.
>
> The log file has very large number of INFO and DEBUG statements such as the following:
> 01:52:45.412 [main] INFO  o.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
> 01:52:45.465 [main] INFO  org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
> 01:52:45.468 [main] INFO  org.hibernate.cfg.Environment - hibernate.properties not found

Looks like misconfigured Log4J.logging framework.  You are missing
log4j.properties file somewhere (or you have several such files which
conflict with each other).

When Tomcat's JULI is used it formats its log statements differently.

> After the last set of changes to my application

And you know what those changes were?

Start over with a fresh configuration.


If nothing else helps you may try the following (~joke):

1. Create file bin/setenv.sh with the following content:
CATALINA_OUT=/dev/null

2. Make the file executable.
3. Restart Tomcat.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org