-->
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: non-specific JDBC error on delete, can't sync db state
PostPosted: Tue Nov 15, 2005 5:07 pm 
Newbie

Joined: Mon Sep 12, 2005 3:58 pm
Posts: 8
I am having trouble figuring out why a delete is not working.

Primarily, I can't even figure out what the issue is, because the error returned is simply "failed batch," with no SQL Error reported.

I am bundling up a whole bunch of related objects and deleting them in a single transaction inside of a Swing application. When the transaction finishes, I get the error reported below.

I just want to know how I can figure out the actual database error being reported... or how one goes about drilling down on a "can't synchronize database state with session" issue.

Fundamentally, when the operation completes, the database will be empty (for the purposes of the test operation I am running right now).

How can I figure out what the issue is ?

thanks in advance,

tiredbear

Hibernate version:3.0.5

Name and version of the database you are using:HSQLDB 1.7.3.3

Full stack trace of any exception that occurs:

ext WARN 2005-11-15 12:56:44,468 [entQueue-0] ...ate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
ext ERROR 2005-11-15 12:56:44,468 [entQueue-0] ...ate.util.JDBCExceptionReporter - failed batch
ext ERROR 2005-11-15 12:56:44,484 [entQueue-0] ....AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:181)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
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:730)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)


Top
 Profile  
 
 Post subject: still wondering how to debug this although I fixed the issue
PostPosted: Tue Nov 15, 2005 6:03 pm 
Newbie

Joined: Mon Sep 12, 2005 3:58 pm
Posts: 8
So I was able to get around the issue by using a different method of getting all the necessary objects to delete -- it appears that a proxy object was throwing off the delete transaction. Can anyone point me to some information about why this might have been the case (deleting a proxy causing session to 'unsync' to db state?). Also, I'm still wondering how to drill down on the exception that was thrown to get more information, if anyone can help with that.


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.