title: Error Inserting Java Character object value into Oracle CHAR(1) column
body: <p>I'm using a Spring <code>jdbcTemplate.update(String sql, Object[] args)</code> to execute a prepared insert statement on an Oracle database. One of the objects is a Character object containing the value 'Y', and the target column is of CHAR(1) type, but I'm receiving a </p>
  
  <pre><code>java.sql.SQLException: Invalid column type
  </code></pre>
  
  <p>exception. </p>
  
  <p>I've debugged this backwards and forwards and there is no doubt that it is this one particular object that is causing the problem. The insert executes as expected when this Character Object is omitted. </p>
  
  <p>I can also output the sql and Object[] values, copy the sql into sql developer, replace the value placeholders <code>(?'s)</code> with the actual values of the Objects, and the insert will work fine.</p>
  
  <p>The sql (obfuscated to protect the guilty):</p>
  
  <pre><code>INSERT INTO SCHEMA.TABLE(NUMBER_COLUMN,VARCHAR_COLUMN,DATE_COLUMN,CHAR_COLUMN) VALUES (?,?,?,?);
  </code></pre>
  
  <p>The object values:</p>
  
  <pre><code>values[0] = [123]
  values[1] = [Some String]
  values[2] = [2012-04-19]
  values[3] = [Y]
  </code></pre>
  
  <p>The combination run manually in sql developer and that works just fine:</p>
  
  <pre><code>INSERT INTO SCHEMA.TABLE(NUMBER_COLUMN,VARCHAR_COLUMN,DATE_COLUMN,CHAR_COLUMN) VALUES (123,'Some String','19-Apr-2012','Y');
  </code></pre>
  
  <p>The prepared statement sql itself is generated dynamically based on the non-null instance variable objects contained within a data transfer object (we want the database to handle generation of default values), so I can't accept any answers suggesting that I just rework the sql or insertion routine.</p>
  
  <p>Anyone ever encountered this and can explain to me what's going on and how to fix it? It's frustratingly bizzare that I can't seem to insert a Character object into a CHAR(1) field. Any help would be much appreciated.</p>
  
  <p>Sincerely, Longtime Lurker First-time Poster</p>