When I go to "View Live > Available Campaigns > Click on my campaign > Start campaign" the expected phone calls never happen. Catalina.log shows that wombat is hitting the below error. Anybody know how to solve this, or even how to make Wombat tell me which particular rows it is complaining about? If I knew which query was returning an unexpected number of rows, I could probably figure out what I did wrong.
Nov 12, 2015 3:03:10 PM ch.loway.app.wombat.dialer.WombatDialerWatchdog notifyEr
rorServer
SEVERE: -- Inner Exception --
Exception: java.lang.IllegalThreadStateException
Error:
-- Inner Exception --
Exception: org.hibernate.jdbc.BatchedTooManyRowsAffectedException
Error:
Batch update returned unexpected row count from update
expected: 1
Stack trace:
org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned un
expected row count from update
- ; actual row count: 2; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expecta
tions.java:95)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expect
ations.java:70)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.jav
a:90)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
268)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:114)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:109)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatc
her.java:244)
at org.hibernate.persister.collection.BasicCollectionPersister.doUpdateR
ows(BasicCollectionPersister.java:216)
at org.hibernate.persister.collection.AbstractCollectionPersister.update
Rows(AbstractCollectionPersister.java:1541)
at org.hibernate.action.CollectionUpdateAction.execute(CollectionUpdateA
ction.java:85)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:170)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at ch.loway.app.wombat.dialer.WombatDialerProcess.commitOnTimeout(Wombat
DialerProcess.java:1792)
at ch.loway.app.wombat.dialer.WombatDialerProcess.processWombatBrain(Wom
batDialerProcess.java:643)
at ch.loway.app.wombat.dialer.WombatDialerProcess.runIteration(WombatDialerProcess.java:243)
at ch.loway.app.wombat.dialer.WombatDialerProcess.run(WombatDialerProcess.java:154)
at ch.loway.oss.slicedbread.MessagingConsole$1.run(MessagingConsole.java:191)
at java.lang.Thread.run(Thread.java:745)
-- End Inner Exception --
Edit: I think I found the query via MySQL's slow log:
SELECT c.campaignId, c.name, c.securityKey, hopper.runMode, count(*) as NUM FROM campaigns c LEFT JOIN hopper ON c.campaignId = hopper.campaign WHERE c.pace = 'RUNNABLE' GROUP BY c.campaignId, c.name, c.securityKey, hopper.runMode;
+------------+------------+-------------+-----------+-----+
| campaignId | name | securityKey | runMode | NUM |
+------------+------------+-------------+-----------+-----+
| 1 | mycampaign | | COMPLETED | 11 |
| 1 | mycampaign | | UNSAVED | 10 |
+------------+------------+-------------+-----------+-----+
2 rows in set (0.00 sec)
I'm still not sure how to fix this, though. Delete one of those rows?