Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TransientObjectException while fetching data.

 
Ayyappan Selvaraj
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"skumar"

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.


Thanks!
 
Lance Gleason
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem as well and have been banging my head against a wall trying to find a solution to it.

Lance
 
Ayyappan Selvaraj
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying. The following is the hbm file entries..

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic