[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2247) Finder method giving : ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
Christian Bauer (JIRA)
noreply at atlassian.com
Thu Nov 16 23:39:04 EST 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2247?page=all ]
Christian Bauer resolved HHH-2247:
----------------------------------
Resolution: Rejected
http://forum.hibernate.org
> Finder method giving : ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-2247
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2247
> Project: Hibernate3
> Type: Bug
> Environment: Hibernate 3.2, Oracle
> Reporter: Gibu George
>
>
> The scenario is like I have a page where I can create a new entity, the first time when I create the entity it works fine with a particular code which is a Unique key on the table, then I tried to create a new entity with a different code that also worked fine. But when I tried to change the code of second entity to the same as that of the first one, in my *validate method* which tries to *find* whether there any enitity with such a code, it gives the follwoing stack trace. This is happening before the save is called also if I try to refresh the page after the error occurs it works fine and gives a proper validation failed message.
> ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
> org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
> at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
> at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
> at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:954)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1099)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list