-->
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.  [ 2 posts ] 
Author Message
 Post subject: Insert problem
PostPosted: Fri Dec 14, 2007 3:02 am 
Newbie

Joined: Fri Dec 14, 2007 2:53 am
Posts: 1
I am trying to insert a new row into my database but it is giving me an error

Exception in thread "main" org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:88)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:74)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:154)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:669)
at roseindia.tutorial.hibernate.FirstExample.main(FirstExample.java:43)

I have used postgres Dialect and am using a simple setter class.
Please help me out on this.It's very urgent

Thanx in advance.


Top
 Profile  
 
 Post subject: Re: Insert problem
PostPosted: Fri Dec 14, 2007 3:02 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
g_rana wrote:
I have used postgres Dialect and am using a simple setter class.
Please help me out on this.It's very urgent

Thanx in advance.


What is the mapping for the primary key of the class that is being updated by the query?



Farzad-


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