The caching of the prepared statement for updating the last ack was wrong. Reported at http://www.nabble.com/Is-this-a-bug-in-DefaultJDBCAdapter.java--tf1890445s2354.html#a5170127