title: Spring JDBC & Oracle DB 12c: java.sql.SQLException: Invalid column type. Why?
body: <p>I'm struggling with following exception:</p>
  
  <pre><code>org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [update EVALUATION_SHEET set STATUS=?, LAST_EDITED=? where id=?]; SQL state [99999]; error code [17004]; Invalid column type; nested exception is java.sql.SQLException: Invalid column type
  </code></pre>
  
  <p>Which is thrown here:</p>
  
  <pre><code>jdbcTemplate.update("update E_SHEET set STATUS=?, LAST_EDITED=? where id=?",
                  new Object[]{eSheet.getStatus().ordinal(), eSheet.getLastEditDate(), eSheet.getId()},
                  new Object[]{OracleTypes.NUMBER, OracleTypes.TIMESTAMP, OracleTypes.NUMBER});
  </code></pre>
  
  <p>The database table is created as follows:</p>
  
  <pre><code>create table E_SHEET (
    ID number not null unique,
    ID_POSITION number not null,
    STATUS number default 0 not null,
    ID_EXAMINER number not null,
    LAST_EDITED timestamp not null);
  </code></pre>
  
  <p>I have no idea what is causing the problem. This method:</p>
  
  <pre><code> eSheet.getLastEditDate()
  </code></pre>
  
  <p>returns java.util.Date object. I am using Spring JDBC template with Spring Boot and Oracle DB 12c as a datasource.</p>