Paulo_Nepomuceno 4 de jul. de 2006
Então…, quando tento deletar um registro ou fazer update retorna essa exception:
Ps.: acabei de testar com o driver que vc indicou e deu o mesmo pau…, tem alguma idéia do que pode ser?
ERROR AbstractFlushingEventListener ( performExecutions : 300 ) - Could not synchronize database state with session
org . hibernate . StaleStateException : Unexpected row count : - 1 expected : 1
at org . hibernate . jdbc . NonBatchingBatcher . addToBatch ( NonBatchingBatcher . java : 27 )
at org . hibernate . persister . entity . AbstractEntityPersister . delete ( AbstractEntityPersister . java : 2291 )
at org . hibernate . persister . entity . AbstractEntityPersister . delete ( AbstractEntityPersister . java : 2440 )
at org . hibernate . action . EntityDeleteAction . execute ( EntityDeleteAction . java : 73 )
at org . hibernate . engine . ActionQueue . execute ( ActionQueue . java : 248 )
at org . hibernate . engine . ActionQueue . executeActions ( ActionQueue . java : 232 )
at org . hibernate . engine . ActionQueue . executeActions ( ActionQueue . java : 144 )
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 teste . TesteExclusaoPessoa . main ( TesteExclusaoPessoa . java : 21 )
Exception in thread “ main ” org . hibernate . StaleStateException : Unexpected row count : - 1 expected : 1
at org . hibernate . jdbc . NonBatchingBatcher . addToBatch ( NonBatchingBatcher . java : 27 )
at org . hibernate . persister . entity . AbstractEntityPersister . delete ( AbstractEntityPersister . java : 2291 )
at org . hibernate . persister . entity . AbstractEntityPersister . delete ( AbstractEntityPersister . java : 2440 )
at org . hibernate . action . EntityDeleteAction . execute ( EntityDeleteAction . java : 73 )
at org . hibernate . engine . ActionQueue . execute ( ActionQueue . java : 248 )
at org . hibernate . engine . ActionQueue . executeActions ( ActionQueue . java : 232 )
at org . hibernate . engine . ActionQueue . executeActions ( ActionQueue . java : 144 )
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 teste . TesteExclusaoPessoa . main ( TesteExclusaoPessoa . java : 21 )
==============================================
já tentei de tudo que é jeito e a única coisa pode ser incompatibilidade…, pq com mysql 5 o mesmo código funcionou…
Obrigado!