title: @DateTimeFormat(pattern="yyyy-MM-dd") with Spring Mvc Rest Service gives "error 400 request syntactically incorrect"
body: <p>I'm not able to let this work:</p>
  
  <pre><code>@RequestMapping(value = "/people", method = RequestMethod.GET, produces = "application/json")
      public @ResponseBody
      List&lt;IPerson&gt; searchPerson(@RequestParam(value = "birthDay", required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date birthDay) {
  </code></pre>
  
  <p>with the request:</p>
  
  <pre><code>http://localhost:8080/rest/people?birthDay=2014-05-25
  </code></pre>
  
  <p>The error is always :</p>
  
  <blockquote>
    <p>"HTTP Status 400 - The request sent by the client was syntactically
    incorrect".</p>
  </blockquote>
  
  <p>I can't find any resource that give me a clear answer/guide to understand the underlying problem... could someone help me? Thanks!</p>
  
  <p><strong>Edit:</strong>
  Exception is:</p>
  
  <pre><code>Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type @org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.util.Date for value '2010-10-10'; nested exception is java.lang.IllegalArgumentException
      at org.springframework.core.convert.support.ObjectToObjectConverter.convert(ObjectToObjectConverter.java:78)
      at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35)
      at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:168)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:161)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:93)
      at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:61)
  
  ... 40 more
  Caused by: java.lang.IllegalArgumentException
      at java.util.Date.parse(Date.java:615)
      at java.util.Date.&lt;init&gt;(Date.java:272)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.springframework.core.convert.support.ObjectToObjectConverter.convert(ObjectToObjectConverter.java:73)
      ... 45 more
  </code></pre>