title: SQL query on H2 database table throws ArrayIndexOutOfBoundsException
body: <p>I have a H2 database on which some queries work, while others are throwing an <code>ArrayIndexOutOfBoundsException</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>SELECT COLUMN_1 FROM MY_TABLE; // works fine
  
  
  SELECT COUNT(COLUMN_1) FROM MY_TABLE; // gives following error message:
  [Error Code: 50000, SQL State: HY000]  
  General error: "java.lang.ArrayIndexOutOfBoundsException"; 
  SQL statement: SELECT COUNT(COLUMN_1) FROM MY_TABLE [50000-167]
  </code></pre>
  
  <p>What is the cause for this eror message?</p>