title: Java Spring "could not extract ResultSet; SQL [n/a] "
body: <p>I try to learn spring.And i got this error on Get method with Postman.
  I'm using PostgreSQL, Hibernate and Spring.</p>
  
  <p>My Error is </p>
  
  <pre><code>"exception": "org.springframework.dao.InvalidDataAccessResourceUsageException",
  "message": "could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet"
  </code></pre>
  
  <p>My pom.xml postgresql dependency</p>
  
  <pre><code>        &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>My application.properties </p>
  
  <pre><code>    spring.datasource.driverClassName=org.postgresql.Driver
  spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
  spring.datasource.username=postgres
  spring.datasource.password=
  spring.jpa.hibernate.ddl-auto=create-drop
  </code></pre>
  
  <p>I suppose the cause of this error database connection.But i share my controller.</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET)
  public List&lt;User&gt; findAllUser(){
      return userRepository.findAll();
  }
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>@Entity
  public class User {
      @Id
      @GeneratedValue
      private long id;
  
      private String username;
  
      private String  password;
  }
  </code></pre>
  
  <p>And getter&amp;setter method</p>
  
  <p>My UserRepository</p>
  
  <pre><code>@Repository
  public interface UserRepository extends JpaRepository&lt;User,Long&gt;{
  
  
  }
  </code></pre>
  
  <p>AddUserRequest</p>
  
  <pre><code> public class AddUserRequest {
  
      public String username;
  
      public String password;
  
      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;
      }
  }
  </code></pre>
  
  <p>And last one, My database name is "postgres" ,schema name is "Deneme".</p>