-->
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.  [ 1 post ] 
Author Message
 Post subject: Unable to locate row for retrieval of generated properties
PostPosted: Fri May 18, 2007 11:10 am 
Newbie

Joined: Thu Jun 22, 2006 9:41 am
Posts: 2
Hi,

In our entity bean code which is to be refactored soon, for the time being we are calling the hibernate session methods based on a boolean switch. This was working fine, but recently it started throwing exception when we are trying to insert a record. Looking at the exception, it seems hibernate is trying to locate a corresponding row in DB against the values being passed and failing to do so and hence exception.

our entity bean looks like

e.g AbcEJB extends SessionBean {
boolean flag = true;

public TessObject createTestObject(TestObject data){

if(flag) {
Session ss = HibernateUtility.getSession();
session.saveOrUpdate(data);
session.flush();
return data;
}
...
entityHome = lookupHome();
entityHome.create(x,y,z);
...
...

}

}

The Exception being thrown is

Error: System Error:
javax.transaction.TransactionRolledbackException: EJB Exception: : org.hibernate.HibernateException: Unable to locate row for retrieval of generated properties: [com.abc.pqr.TestObject#component[x,y]{x=VAL1, y=VAL2}]

Please let me know the solution if anyone has come across such an issue.


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

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.