title: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping
body: <p>I've got an error with date comparison in ibatis in Springboot 2.0 and I'm out of ideas.</p>
  
  <p>My Mapper looks like this (using MySql):</p>
  
  <pre><code>@Select("select count(s.id,r.date) from eshrsys.score s join eshrsys.round on (s.round_id = r.id) where r.date &gt; '#{date,jdbcType=DATE}'")
  Integer getScoreCountFromDate(Date date);
  </code></pre>
  
  <p>I'm passing in a valid java.sql.date object that's not null.  But I get this error referencing the date comparison:</p>
  
  <blockquote>
    <p>2018-09-02 21:14:23.999 ERROR 5644 --- [nio-8088-exec-2]
    o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for
    servlet [dispatcherServlet] in context with path [] threw exception
    [Request processing failed; nested exception is
    org.mybatis.spring.MyBatisSystemException: nested exception is
    org.apache.ibatis.type.TypeException: Could not set parameters for
    mapping: ParameterMapping{property='date', mode=IN, javaType=class
    java.sql.Date, jdbcType=DATE, numericScale=null, resultMapId='null',
    jdbcTypeName='null', expression='null'}. Cause:
    org.apache.ibatis.type.TypeException: Error setting non null for
    parameter #1 with JdbcType DATE . Try setting a different JdbcType for
    this parameter or a different configuration property. Cause:
    java.sql.SQLException: Parameter index out of range (1 > number of
    parameters, which is 0).]</p>
  </blockquote>
  
  <p>I've tried a number of different workarounds, from converting the input to a string before sending it in, to removing the single quotes, to playing with the jdbcType.  Nothing has worked. </p>