-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to trace the org.hibernate.ObjectNotFoundException?
PostPosted: Tue Jul 24, 2007 8:41 am 
Newbie

Joined: Wed Jan 31, 2007 9:55 pm
Posts: 16
I got the following exception when I tried to get a collection of the objects by:

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.test.trademodel.vo.FXRlseGrpVO#com.test.trademodel.vo.FXRlseGrpIdVO@657f08b3]

But, how can I know which record it refers to? If not, it's very hard to find the problem.

Any ideas?

Thanks!

P.S.

I'm using Hibernate 3.2.1 with Spring 2.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 9:01 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
Implement a proper toString() message in your objects?

_________________
Please don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 9:29 am 
Newbie

Joined: Wed Jul 11, 2007 6:06 am
Posts: 15
Hi there,

The most basic way is to implement a useful toString() method is your object.

Something like:
Code:
public String toString()
{
    return m_id;
}


or
Code:
public String toString()
{
    return m_name;
}


or whatever other variable (or variables) you might think are useful in identifying the object.

--
Best regards,
Jethro Borsje


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