title: Parameter with that position [1] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position [1] did not exist
body: <p>I am using JPA Repository[<strong>Using Spring Data</strong>] to query my database in order to return me a list of events that occurred between the dates I submited. I have class with the following variables that will serve as a request body(<strong>@RequestBody</strong>) in the controller:</p>
  
  <p>//<strong>NOTE ->  My Date must be a String</strong></p>
  
  <pre><code>private String initialDate;
  private String finalDate;
  </code></pre>
  
  <p>I pass the following values int POSTMAN</p>
  
  <pre><code>{
      "initialDate":"2018-09-29",
      "finalDate":"2018-09-30"
  
  }
  </code></pre>
  
  <p>This is my correspondent Model class</p>
  
  <pre><code>private String initialDate;
  private String finalDate;
  private String moreInfo;
  private String SomeMoreInfo;
  </code></pre>
  
  <p>I would like the API to return me the info between those dates, for that I use the following query in my repository layer.</p>
  
  <pre><code>@Query("SELECT u from Kitchen u WHERE STR_TO_DATE(u.date, '%a, %c %b %Y %k:%i:%s') between :initial_day AND :final_day")            
      List&lt;Cozinha&gt; findPlateByDate(@Param("initial_day") String initial_day,@Param("final_day") String final_day);
  </code></pre>
  
  <p>The following error appears in POSTMAN [as posted in the title of the question]</p>
  
  <pre><code> "message": "Parameter with that position [1] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position [1] did not exist",
  </code></pre>
  
  <p>The following error appears in netbeans server console</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Parameter with that position [1] did not exist
  </code></pre>
  
  <p>My question is, I am doing the query right? Our the syntax wrong?</p>