title: Spring Batch - Erro Config XML job - Date
body: <p>I have a procedure in sql waiting three parameters. The first 2 parameters are dates and last a cursor.</p>
  
  <p>How do I configure the XML job Spring Batch</p>
  
  <p>I tried so</p>
  
  <pre><code>&lt;bean id="databaseItemReader" class="org.springframework.batch.item.database.StoredProcedureItemReader"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="procedureName" value="MyProcedureSQL" /&gt;
          &lt;property name="fetchSize" value="50" /&gt;        
          &lt;property name="parameters"&gt;
              &lt;list&gt;
                  &lt;bean class="org.springframework.jdbc.core.SqlParameter"&gt;                   
                      &lt;constructor-arg index="0" value="P_INICIO"/&gt;
                      &lt;constructor-arg index="1"&gt;
                          &lt;util:constant static-field="java.sql.TYPES.Date"/&gt;
                      &lt;/constructor-arg&gt;
                  &lt;/bean&gt;
                  &lt;bean class="org.springframework.jdbc.core.SqlParameter"&gt;                   
                      &lt;constructor-arg index="0" value="P_TERMINO"/&gt;
                      &lt;constructor-arg index="1"&gt;
                          &lt;util:constant static-field="java.sql.TYPES.Date"/&gt;
                      &lt;/constructor-arg&gt;
                  &lt;/bean&gt;             
  
                  &lt;bean class="org.springframework.jdbc.core.SqlParameter"&gt;                   
                      &lt;constructor-arg index="0" value="P_RESULT"/&gt;
                      &lt;constructor-arg index="1"&gt;
                          &lt;util:constant static-field="java.sql.Types.int"/&gt;
                      &lt;/constructor-arg&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="rowMapper"&gt;
              &lt;bean class="main.java.br.com.util.DataEmployeeMapper" /&gt;
          &lt;/property&gt;
          &lt;property name="refCursorPosition" value="3"/&gt;
          &lt;property name="preparedStatementSetter" ref="preparedStatementSetter" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>It appears the error</p>
  
  <p><strong>Invocation of init method failed; nested exception is java.lang.NoSuchFieldException: Date</strong></p>
  
  <p>In this variation I have also tried</p>
  
  <pre><code>&lt;util:constant static-field="java.sql.Date"/&gt;
  &lt;util:constant static-field="java.sql.Types.timeStamp"/&gt;
  </code></pre>
  
  <p>How do I set to send the two dates for procedure?</p>