title: nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC
body: <p>I am trying to fetch records from the database and I am having the above error</p>
  
  <p><strong>This is my classs with appropriate getters and setters</strong></p>
  
  <pre><code>public class User {
      private int id;
      private String username;
      private String password;
      private String email;
  </code></pre>
  
  <p>I have also create the database and inserted data into it with the below configuration</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"&gt;
          &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
          &lt;property name="url" value="jdbc:mysql://localhost:3306/usersdb"/&gt;
          &lt;property name="username" value="root"/&gt;
          &lt;property name="password" value=""/&gt;
      &lt;/bean&gt;   
  </code></pre>
  
  <p>This is the complete stacktrace</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet [appServlet] in context with path [/spring] threw exception [Request processing failed; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
  com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'usersdb.users' doesn't exist
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
  </code></pre>
  
  <p>Please what could be wrong I new on Spring MVC with Hibernate</p>
  
  <p>The complete code for User.java</p>
  
  <pre><code>package net.codejava.spring.model;
  
  public class User {
      private int id;
      private String username;
      private String password;
      private String email;
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
  }
  </code></pre>