-->
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.  [ 6 posts ] 
Author Message
 Post subject: Display parameterized query values
PostPosted: Mon Apr 19, 2010 3:21 pm 
Newbie

Joined: Mon Apr 19, 2010 3:14 pm
Posts: 2
Does anyone know how to display the parameter values in a parameterized query?

Thank you in advance.


Top
 Profile  
 
 Post subject: Re: Display parameterized query values
PostPosted: Tue Apr 20, 2010 12:26 am 
Newbie

Joined: Tue Apr 06, 2010 8:46 am
Posts: 7
You mean in the logs?
AFAIK you can't


Top
 Profile  
 
 Post subject: Re: Display parameterized query values
PostPosted: Tue Apr 20, 2010 12:30 am 
Regular
Regular

Joined: Wed Apr 25, 2007 11:44 pm
Posts: 59
agree with grid


Top
 Profile  
 
 Post subject: Re: Display parameterized query values
PostPosted: Fri Apr 23, 2010 11:14 am 
Newbie

Joined: Mon Apr 19, 2010 3:14 pm
Posts: 2
Thanks. but then how does one debug something like this?:

[4/23/10 10:59:01:460 EDT] 00000058 SystemOut O Hibernate: select portalreso0_.PRS_PORTAL_ID as PRS_PORT1_0_, portalreso0_.PRS_RESOURCE_ID as PRS_RESO2_0_, portalreso0_.PRS_RESOU_TYPE_CDE as PRS_RESO3_0_, portalreso0_.PRS_RESOURCE_DSC as PRS_RESO4_0_ from xxxxxxxx.dbxxxxxx portalreso0_ where portalreso0_.PRS_PORTAL_ID=? and portalreso0_.PRS_RESOURCE_ID=?
[4/23/10 10:59:01:463 EDT] 00000058 PersistentCol E net.sf.hibernate.collection.PersistentCollection initialize Failed to lazily initialize a collection
net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: com.medco.framework.securitymngr.bizcomponents.portalsettings.internal.PortalResourceId@667f5266, of class: com.medco.framework.securitymngr.bizcomponents.portalsettings.internal.PortalResourcesImpl

This is the last of thousands of selects .


Top
 Profile  
 
 Post subject: Re: Display parameterized query values
PostPosted: Sat Apr 24, 2010 9:08 am 
Regular
Regular

Joined: Wed Apr 25, 2007 11:44 pm
Posts: 59
seems like you deleted some records from db outside the hibernate session.

this might be my guess not exactly sure abt that


Top
 Profile  
 
 Post subject: Re: Display parameterized query values
PostPosted: Sat Apr 24, 2010 2:18 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
It is possible to log query parameters. Turn on debug logging for 'org.hibernate.type' as explained in http://docs.jboss.org/hibernate/stable/ ... on-logging

From the log messages shown in a previous post I think it might be a good idea to implement PortalResourceId.toString() as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.