In NonBatchingBatch.addToBatch() are some bugs (missing try...finally) that leaves the class in an undefined condition if the statement there fails. In addition, statements are not closed on error.
I have attached a project that shows the bug and contains a fix.
Here's my complete description (which you will also find in ShowBug.java):
/** ...
This message was sent by Atlassian JIRA (v6.1-OD-09-WN#6144-sha1:62dfc48)