[jboss-as7-dev] hibernate log wine ;)

Scott Marlow smarlow at redhat.com
Thu May 19 08:33:28 EDT 2011


On 05/19/2011 06:13 AM, Ales Justin wrote:
>>  From what I see in one of Scott Marlow's mails, I think he already has
>> started a discussion on reducing the verbosity of these log messages in
>> Hibernate.
>
> Sure, but I think that WARN has to be dealt beyond logging.
>
> Since I'm not setting any custom "hibernate.transaction.factory_class",
> but still getting the warning -->  bad AS7 integration?

Funny, I thought the same thing, that this warning was something I 
needed to fix in the AS7 integration.

"
[org.hibernate.ejb.AbstractEntityManagerImpl] HHH00326:Cannot join 
transaction: do not override hibernate.transaction.factory_class
"

After looking at the Hibernate 4.0 AbstractEntityManager.joinTransaction 
method, it looks more like something that should be changed in 
Hibernate.  Steve and I are already talking about making that warning go 
away.

Regarding the verboseness of some of the other messages.  Some of the 
INFO messages are definitely not as critical (e.g. getting/release 
database connections could probably be DEBUG or TRACE messages).

If anyone wants to review the Hibernate 4 log messages, they are mostly 
here 
https://github.com/hibernate/hibernate-core/blob/master/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java

I'm not convinced that all non-critical INFO log messages should be 
changed to DEBUG/TRACE.  The general rule in the past has been to show 
information that might be useful (if it doesn't harm or cause too much 
clutter).  I think we can definitely change some of the Hibernate INFO 
log message to DEBUG/TRACE but probably not all of them.  The new 
logging rule (http://community.jboss.org/wiki/HowtologinJBossprojects) 
is to only log crucial information at INFO.

A recent example of other non-critical INFO (deployment time) that 
recently showed up in server.log is the following.  I really like that 
we are showing the EJB JNDI bindings and would like to see the same for 
the Hibernate 2LC. http://pastie.org/1926468


>
>>> This is my persistence.xml
>>>
>>>      <persistence-unit name="radar" transaction-type="JTA">
>>> 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
>>> 		<jta-data-source>java:/H2DS</jta-data-source>
>>>          <!-- entities -->
>>>          <class>org.jboss.lhotse.server.api.domain.AbstractEntity</class>
>>>          <class>org.jboss.lhotse.server.api.domain.TimestampedEntity</class>
>>>          <class>org.jboss.lhotse.server.api.domain.GeoPt</class>
>>>          <class>org.jboss.lhotse.server.api.domain.Version</class>
>>>          <class>com.alterjoc.radar.server.domain.AuditLog</class>
>>>          <exclude-unlisted-classes>true</exclude-unlisted-classes>
>>>          <properties>
>>>              <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
>>>              <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
>>>              <property name="hibernate.show_sql" value="false"/>
>>>              <property name="hibernate.format_sql" value="true"/>
>>>          </properties>
>>>      </persistence-unit>
>>>
>>> when running / testing app in latest AS7, Hibernate barfs a ton of INFO / WARN:
>>> * http://pastebin.com/iJCahSFi
>>>
>>> It looks like things do work, but definitely something I as a user don't like to see.
>>>
>>> -Ales
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list