users@glassfish.java.net

Re: Problem with logging hibernate 4.1.1 and GlassFish 3.2.2

From: Rafael Bittencourt <rafaelobitten_at_gmail.com>
Date: Tue, 13 Nov 2012 15:43:02 -0300

Output in Glassfish 3.1.2.2:

Informações: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

log4j doesnt work.

Output in GlassFish 3.1.2:

INFO Version:37 - HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

LOG4j works !!

Someone can help me?

2012/11/13 Rafael Bittencourt <rafaelobitten_at_gmail.com>

> Glassfish 3.1.2* and 3.1.2.2 *
>
>
> 2012/11/13 Rafael Bittencourt <rafaelobitten_at_gmail.com>
>
>> Dear,
>>
>> When i updated the glassfish from 3.2 to 3.2.2 the hibernate logging to
>> show sql values stopped to work: I use the sl4fj to log it
>>
>> -commons-logging
>> -slf4j-log4j
>> -log4j(1.2.17)
>> -slf4j-api(1.7.2)
>>
>> hibernate.cfg
>>
>> <property name="hibernate.show_sql">true</property>
>> <property name="hibernate.format_sql">true</property>
>>
>> log4j.properties
>>
>> # Log everything. Good for troubleshooting
>> log4j.logger.org.hibernate=INFO
>>
>> log4j.logger.org.hibernate.type=ALL
>> log4j.logger.org.hibernate.jdbc=trace
>>
>> So i got this in my stdout
>>
>> Informações: HHH000046: Connection properties: {user=root, password=****}
>> Informações: HHH000006: Autocommit mode: false
>>
>> I dont know why its happens, but if i downgrade to glassfish 3.2, with
>> same configuration, it works and i can see the sql values from hibernate.
>>
>> Someone has any idea ?
>>
>
>