title: java.lang.IllegalArgumentException: SQL must not be null
body: <p>Iam using jdbc templete for fetching data from database wheerein all my queries are stored in xml file</p>
  <p>Found a weird problem</p>
  <p>initial query in xml file was</p>
  <p><code>select * from invoice where  YEAR(INV.BILL_DATE) =? AND MONTH(INV.BILL_DATE) = ? </code></p>
  <p>its working fine as above after changing above query</p>
  <pre><code>select * from invoice where (INV.BILL_DATE &gt;= CAST(? AS DATE)) AND (INV.BILL_DATE &lt;= CAST(? AS DATE))
  </code></pre>
  <p>Iam getting</p>
  <pre><code>java.lang.IllegalArgumentException: SQL must not be null
  
  java.lang.IllegalArgumentException: SQL must not be null
  
  java.lang.IllegalArgumentException: SQL must not be null
      at org.springframework.util.Assert.notNull(Assert.java:115)
      at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.&lt;init&gt;(JdbcTemplate.java:1515)
      at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:716)
      at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:726)
      at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:776)
  </code></pre>