title: What is a solution of "Multiple ResultSets were returned by the query"
body: <p>I get error:</p>
  
  <pre><code>ERROR [NewsDAO] findAll(): org.postgresql.util.PSQLException: Multiple ResultSets were returned by the query.
  </code></pre>
  
  <p>Im using postgresql-8.4-703.jdbc4.jar.</p>
  
  <p>My code looks like: </p>
  
  <pre><code>private static StringBuilder findAllQuery = new StringBuilder();
  
      {
      findAllQuery.append("SELECT * FROM news;");
  }
  
      public List&lt;News&gt; findAll() {
      Statement stm = null;
      ResultSet rs = null;
  
      List&lt;News&gt; results = new ArrayList&lt;News&gt;();
      if (obtainConnection()) {
          try {
              stm = con.createStatement();
              rs = stm.executeQuery(findAllQuery.toString());
              while(rs.next())
                  results.add(setInObject(rs));
          } catch (Exception e) {
              logger.error("findAll(): " + e);
          } finally {
              logger.info("Zamknalem");
              closeConnection();
          }
      }
      return results;
  }
      public News setInObject(ResultSet rs) throws SQLException {
      News news = new News();
      news.setId(rs.getInt("id"));
      news.setTitle(rs.getString("title"));
      news.setDescription(rs.getString("description"));
      //TODO: timestamp
      news.setDate(rs.getDate("date"));
      User user = new User();
      user.setId(rs.getInt("user_id"));
      news.setUser(user);
      news.setActive(rs.getBoolean("active"));
      return news;
  }
  </code></pre>
  
  <p>I don't know why i get this error. Any ideas?</p>