-->
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: org.hibernate.StaleStateException
PostPosted: Thu Apr 06, 2006 12:28 am 
Beginner
Beginner

Joined: Sun Oct 16, 2005 12:37 pm
Posts: 47
Location: Romania, Galati
I have one master table and twelve partition tables for each month. I have twelve rules that insert rows into correct partition table (after column "timpul" - timestamp). What is wrong? I real need partition tables...:(.

Hibernate version:8.1.3

Mapping documents:
Master.hbm.xml
<class name="unu.model.Master" table="master" schema="public" dynamic-insert="true" dynamic-update="true" lazy="true">
<id name="masterid" type="int">
<column name="masterid" />
<generator class="sequence">
<param name="sequence">seq_master</param>
</generator>
</id>
<property name="nume" type="string">
<column name="nume" length="25" not-null="true" unique="true" />
</property>
<property name="timpul" type="timestamp">
<column name="timpul" length="8" not-null="true" />
</property>
</class>


Code between sessionFactory.openSession() and session.close():
tx = session.beginTransaction();
Master master = new Master();
master.setNume("Master11");
master.setTimpul(new Date());
session.save(master);
tx.commit();


Full stack trace of any exception that occurs:
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:93)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at unu.Hibernate.main(Hibernate.java:85)


Name and version of the database you are using:PostgreSQL-8.1

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.