Hi all,
I get the following exception in a small app that replicates data from one database into another. What irritates me, is that the exception is thrown in the iterator that loads objects from the master-database. There should be no updates to the tables in the master-db. At least I didn't plan to change stuff by my app in the master-db.
any suggestions?
jan
16:31:27,453 DEBUG Replication:256 - query: from c in class master.domain.ScanTicket where c.lastModified > ? and c.creationDate < ?
16:31:37,075 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:31:37,079 ERROR JDBCExceptionReporter:46 - Batch-Anweisung Nummer 14 (update scanticket set user_id=null, ticket_value=0.0, last_modified='2003-05-15 10:51:26.076000000+00', creation_date='2003-05-15 10:27:01.221000000+00', closing_date='2003-09-24 14:03:26.701000000+00', store_id=1000154590, client_id='scan103', status='closed', ticket_id='00000001000884240', units_reported=0, units_scanned=24, units_counted=24, time_id=4020575, deliveredtime_id=4020563 where scanticket_id=1000884240) wurde abgebrochen.
16:31:37,087 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:31:37,090 ERROR JDBCExceptionReporter:46 - ERROR: deadlock detected
16:31:37,092 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:31:37,095 ERROR JDBCExceptionReporter:46 - Batch-Anweisung Nummer 14 (update scanticket set user_id=null, ticket_value=0.0, last_modified='2003-05-15 10:51:26.076000000+00', creation_date='2003-05-15 10:27:01.221000000+00', closing_date='2003-09-24 14:03:26.701000000+00', store_id=1000154590, client_id='scan103', status='closed', ticket_id='00000001000884240', units_reported=0, units_scanned=24, units_counted=24, time_id=4020575, deliveredtime_id=4020563 where scanticket_id=1000884240) wurde abgebrochen.
16:31:37,105 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:31:37,106 ERROR JDBCExceptionReporter:46 - ERROR: deadlock detected
16:31:37,110 ERROR JDBCExceptionReporter:37 - Could not synchronize database state with session
Batch-Anweisung Nummer 14 (update scanticket set user_id=null, ticket_value=0.0, last_modified='2003-05-15 10:51:26.076000000+00', creation_date='2003-05-15 10:27:01.221000000+00', closing_date='2003-09-24 14:03:26.701000000+00', store_id=1000154590, client_id='scan103', status='closed', ticket_id='00000001000884240', units_reported=0, units_scanned=24, units_counted=24, time_id=4020575, deliveredtime_id=4020563 where scanticket_id=1000884240) wurde abgebrochen.
at org.postgresql.jdbc2.Statement.executeBatch(Statement.java:201)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:50)
at net.sf.hibernate.impl.BatchingBatcher.addToBatch(BatchingBatcher.java:30)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:633)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:602)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:27)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2101)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2074)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1579)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1385)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1409)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1399)
at de.janheise.Query.findObjectsIterator(Query.java:91)
at de.janheise.replication.Replication.findModifiedObjects(Replication.java:258)
at de.janheise.replication.Replication.replicate(Replication.java:188)
at de.janheise.replication.Replication.importExport(Replication.java:163)
at de.janheise.replication.Replication.main(Replication.java:348)
16:31:37,125 ERROR Query:93 - Error querying: from c in class master.domain.ScanTicket where c.lastModified > Thu Jan 01 01:00:00 CET 1970 and c.creationDate < Wed Sep 24 15:43:36 CEST 2003
Batch-Anweisung Nummer 14 (update scanticket set user_id=null, ticket_value=0.0, last_modified='2003-05-15 10:51:26.076000000+00', creation_date='2003-05-15 10:27:01.221000000+00', closing_date='2003-09-24 14:03:26.701000000+00', store_id=1000154590, client_id='scan103', status='closed', ticket_id='00000001000884240', units_reported=0, units_scanned=24, units_counted=24, time_id=4020575, deliveredtime_id=4020563 where scanticket_id=1000884240) wurde abgebrochen.
at org.postgresql.jdbc2.Statement.executeBatch(Statement.java:201)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:50)
at net.sf.hibernate.impl.BatchingBatcher.addToBatch(BatchingBatcher.java:30)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:633)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:602)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:27)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2101)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2074)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1579)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1385)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1409)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1399)
at de.nchmarketing.nchwebworx.management.Query.findObjectsIterator(Query.java:91)
at de.janheise.replication.Replication.findModifiedObjects(Replication.java:258)
at de.janheise.replication.Replication.replicate(Replication.java:188)
at de.janheise.replication.Replication.importExport(Replication.java:163)
at de.janheise.replication.Replication.main(Replication.java:348)
rethrown as
net.sf.hibernate.JDBCException: Could not synchronize database state with session: Batch-Anweisung Nummer 14 (update scanticket set user_id=null, ticket_value=0.0, last_modified='2003-05-15 10:51:26.076000000+00', creation_date='2003-05-15 10:27:01.221000000+00', closing_date='2003-09-24 14:03:26.701000000+00', store_id=1000154590, client_id='scan103', status='closed', ticket_id='00000001000884240', units_reported=0, units_scanned=24, units_counted=24, time_id=4020575, deliveredtime_id=4020563 where scanticket_id=1000884240) wurde abgebrochen.
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2081)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1579)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1385)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1409)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1399)
at de.janheise.Query.findObjectsIterator(Query.java:91)
at de.janheise.replication.Replication.findModifiedObjects(Replication.java:258)
at de.janheise.replication.Replication.replicate(Replication.java:188)
|