title: How to resolve org.springframework.dao.EmptyResultDataAccessException in SpringBatch
body: <p><code>springframework.dao.EmptyResultDataAccessException</code> while trying to select the data from the sql server database, here is the code I have written. Can anybody suggest how to select data from database using query interface?</p>
  
  <pre><code>public int getRedempRequestId(RedemptionResponseBean redemptionResponse)
          throws ParseException {
      final Timestamp redempIdFromCsv = getRedeemDate(redemptionResponse);
      int participantId = redemptionResponse.getOcpEventMemberId();
      System.out.println(redempIdFromCsv);
      System.out.println(participantId);
  
      int res = jdbcTemplate.queryForInt("SELECT RR.REDEMPTION_REQUEST_ID "
              + "FROM  dbo.REDEMPTION_REQUEST RR WITH (NOLOCK)"
              + "WHERE RR.SENT_DATE = ? AND "
              + "RR.OEDEF_OCP_EVENT_MEMBER_ID = ? ", new Object[] {
              redempIdFromCsv, participantId });
      System.out.println(res+"-----------");
      return res;
  }
  </code></pre>
  
  <p>could anybody tell me what's the problem here?</p>