File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes TransientObjectException while fetching data. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "TransientObjectException while fetching data." Watch "TransientObjectException while fetching data." New topic

TransientObjectException while fetching data.

Ayyappan Selvaraj
Ranch Hand

Joined: Sep 20, 2004
Posts: 63
pals Im getting an exeption while querying the DB with hibernate. Im provding the code snippet where I get the exception, the related mapping (hbm file) and the exception trace. Please suggest me what shud be done.

When I googled, I got the info that this exception arises while leaving an unsaved child object to the database when a parent object is saved. But in my case Im trying to query the database.

the code::

the mapping::

the excpetion trace::
sathish kumar
Ranch Hand

Joined: Feb 14, 2007
Posts: 47
Can you throw in tour entire hbm file.This exception might be occurring when you try to select an object that has a array list/collection object associated.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336


Thanks for updating your dispaly name. Unfortunately it is still invalid; we need both a first and last name. Can you please update it again.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Lance Gleason

Joined: Feb 15, 2007
Posts: 1
I am having the same problem as well and have been banging my head against a wall trying to find a solution to it.

Ayyappan Selvaraj
Ranch Hand

Joined: Sep 20, 2004
Posts: 63
Thanks for replying. The following is the hbm file entries..

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

Well, does the session have other objects in it, because it appears to be a parameter to your method, and therefore we don't know what was done before that method call to that session object.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: TransientObjectException while fetching data.
It's not a secret anymore!