Hibernate not showing sql statement even with sql_show=true
You have hibernate.show_sql configured correctly. Where are you looking for the output? In any case, it's better to just forget about show_sql and use Hibernate's logging instead. It's much more flexible. Remove the "hibernate.show_sql" property entirely, and in your logging config use
log4j.logger.org.hibernate.SQL=TRACE
log4j.logger.org.hibernate.type=TRACE
Note that there's no reason to mess with the additivity since everything is writing to the same appender, so this line doesn't do anything and should be removed:
log4j.additivity.org.hibernate.SQL=false
make sure DEBUG is good, at one point hibernate logging changed from DEBUG to TRACE.
Also make sure there is no threshold in your log4j.config
.
if you want also your arguments to be displayed include org.hibernate.type
. You may also need to set org.hibernate.jdbc=TRACE
or try org.hibernate=TRACE
analyse your needs and change back to proper levels per package.