title: Custom mapper class is not getting the result?
body: <p>I am writing a DAO application and I want to get zone data. I have written my own mapper class. I am unable to get values. It is throwing an exception.</p>
  
  <p><strong>Mapper class</strong></p>
  
  <pre><code>public class zoneMapper implements RowMapper {
  
      @Override
      public Object mapRow(ResultSet resultSet, int rowNum) throws SQLException {
  
           ZoneBean zone=new ZoneBean();
          zone.setZoneId(resultSet.getInt("ZONE_ID"));
          zone.setZoneName(resultSet.getString("ZONE_NAME"));
          return zone;
  
      }
  </code></pre>
  
  <p><strong>dao call</strong></p>
  
  <pre><code>List&lt;ZoneBean&gt; zoneList=new ArrayList&lt;ZoneBean&gt;();
          try {
               JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
  
               zoneList = (List&lt;ZoneBean&gt;) jdbcTemplate.queryForObject(
                       queriesConstants.GET_ZONES, new zoneMapper());
               }catch(Exception e){
              System.out.println("getZones "+e.getMessage());
              //logger.error("getZones "+e.getMessage());
          }
   **Exception is**
   getZones Incorrect result size: expected 1, actual 17
  </code></pre>