title: How can EmptyResultDataAccessException be thrown?
body: <p>I have the following method in my DAO implementation:</p>
  
  <pre><code>@Override
  public String getResultEntry(String arg1, String key, String date) throws SQLException, IOException {
      String res = "";
      String sql = buildSQL(arg1, key, date);
  
      MapSqlParameterSource namedParameters = new MapSqlParameterSource();
      namedParameters.addValue("arg1", arg1);
      namedParameters.addValue("id", key);
      namedParameters.addValue("date", date);
  
      try {
          logger.info("getResultEntry is about to execute the following query:[" + sql + "]");
  
          Blob blob = namedParameterJdbcTemplate.queryForObject(sql, namedParameters, Blob.class);
          long blobLength = blob.length();
          byte[] bytes = blob.getBytes(1, (int)blobLength);
  
          logger.info("getResultEntry END");
  
          res = convertBytesToString(bytes);
  
      } catch (EmptyResultDataAccessException erdae) {
          logger.error("getResultEntry failed to execute the query due to exception! Return an empty string ", erdae);
          logger.info("getResultEntry END");
  
          res = "";
      }
      return res;
  
  }
  </code></pre>
  
  <p>sometimes the query returns empty result and the <code>EmptyResultDataAccessException</code> is thrown. I am catching it and return an empty string. However, I keep seeing the exception and afterwards the execution is terminated.</p>
  
  <p>The exception:</p>
  
  <pre><code>org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
  at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
  at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:179)
  at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:191)
  at com.ars.linking.mrretriever.dao.MRRetrieverDAOImpl.getResultEntry(MRRetrieverDAOImpl.java:82)
  at com.ars.linking.mrretriever.exec.MRRetriver.processResults(MRRetriver.java:125)
  at com.ars.linking.mrretriever.exec.MRRetriver.main(MRRetriver.java:81)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
  </code></pre>
  
  <p>What should I do to "properly" handle the exception? (I am not interested to rethrow it just swallow it and return an empty string)</p>