These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: How to enable precise Hibernate SQL
PostPosted: Wed Feb 06, 2008 10:16 am 
Newbie

Joined: Wed Feb 06, 2008 10:06 am
Posts: 14
Hi there,
I'm working with Hibernate 3.1.3 and Maven 2.0.1. I have a J2EE application with several projects inside: a core project (business logic), a web project (end user view) and a MDA project (data link). In my MDA project, in my pom.xml, i defined a variable hibernate.db.showSql to true, enabling Hibernate SQL (this variable is then by AndroMDA, my UML-to-Java code generator).
This works fine, BUT i only get those kind of outputs:

Code:
15:00:21,504 INFO  [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?


Do you know any way to have relevant outputs, with the '?' replaced by the actual values?
Im gonna post this question as well on AndroMDA forum, since the solution might be there as well...

thanks:)


Top
 Profile  
 
 Post subject: Re: How to enable precise Hibernate SQL
PostPosted: Wed Feb 06, 2008 11:25 am 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
Use a jdbc logger like p6spy.



Farzad-


Top
 Profile  
 
 Post subject: log4j config
PostPosted: Wed Feb 06, 2008 11:38 am 
Newbie

Joined: Mon Jul 09, 2007 10:48 am
Posts: 7
Put into log4j:
log4j.logger.org.hibernate.type=DEBUG
and
log4j.logger.org.hibernate.SQL=DEBUG


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 07, 2008 5:20 am 
Newbie

Joined: Wed Feb 06, 2008 10:06 am
Posts: 14
It does not work.
I still get '?' values...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.