xMatters Error: Batch Update Returned Unexpected Row Count

Posted by Travis DePuy  I  August 22, 12

We ran into an interesting issue with an xMatters client recently. After making some changes to the action scripts (business scripts), notifications were going out very inconsistently. We ran test after test, and hunted through the logs, but nothing obvious stood out. The only thing remotely related was this error in the log:

2012-08-09 12:27:50,264 [notificationResolutionEngine-process-pool-thread-2] ERROR - - Exception executing batch: 
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

We opened a ticket with xMatters support, and they found a similar error in a past ticket that was the result of setting the value of a read-only variable. Support tracked this down in our action scripts:

$main.userTime = @script::formatDate( $event.creationTimeValue,$recipient.timeZone, "EEEE, d MMM yyyy HH:mm:ss 'GMT'Z" )

So, if you run into xMatters / AlarmPoint notifications not going out, and the wierd error above in the AlarmPoint.txt file, scroll through your action scripts and check for anything that might be setting a read-only variable.

Techport Thirteen is an xMatters Partner

If anyone else out there has run in to something similar, and has some additional suggestions for a resolution, please post your comment below! Sharing is caring.

Tags:  xMatters