title: Spring JDBC giving error :"queryForObject(String, Object[], Class<String>) from the type JdbcTemplate refers to the missing type DataAccessException "
body: <p>I have created a method in DAO:  </p>
  
  <pre><code>public String getUserName(int userid){
      String sql="SELECT userName from UserDetail where userid=?";
      return jdbcTemplate.queryForObject(sql, new Object[]{userid}, String.class);
  }
  </code></pre>
  
  <p>this line: <code>jdbcTemplate.queryForObject(sql, new Object[]{userid}, String.class)</code> is giving the following errors:</p>
  
  <pre><code>The method queryForObject(String, Object[], Class&lt;String&gt;) from the type JdbcTemplate refers to the missing type DataAccessException
  
  Multiple markers at this line
  - The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced from required .class files
  - The method queryForObject(String, Object[], Class&lt;String&gt;) from the type JdbcTemplate refers to the missing type 
   DataAccessException
  </code></pre>
  
  <p>I am using spring-jdbc 4.0.0 with mysql-connector 5.1.25, commons-dbcp-1.4 and commons-pool-1.6. Could you please tell me what am I mssing.</p>