title: UnableToExecuteStatementException: Batch entry was aborted. Call getNextException to see the cause
body: <p>Using <code>@SqlBatch</code> to batch update the DB </p>
  
  <pre><code>@SqlBatch("&lt;SQL Command&gt;")
  @BatchChunkSize(INSERT_BATCH_SIZE)
  void insert(@BindBean Iterator&lt;SomeObj&gt; someObj);
  </code></pre>
  
  <p>and I'm getting this error: </p>
  
  <blockquote>
    <p>org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException:
    java.sql.BatchUpdateException: Batch entry 0 ... was aborted. Call
    getNextException to see the cause.</p>
  </blockquote>
  
  <p>The problem is the exception that's being caught is a <code>UnableToExecuteStatementException</code> and not the original <code>BatchUpdateException</code>, so I am unable to call <code>getNextException</code> to see the cause. Furthermore, I can run the SQL command in the DB directly just fine. </p>
  
  <p>Any idea how to get to the bottom of the cause or what the issue might be?</p>