title: ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Exhausted Resultset , hey i am getting this exception in my hibernate code?
body: <p>WARN : org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 17011, SQLState: 99999
  ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Exhausted Resultset
  org.hibernate.exception.GenericJDBCException: could not execute query
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
      at org.hibernate.loader.Loader.doList(Loader.java:2556)
      at org.hibernate.loader.Loader.doList(Loader.java:2539)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)
      at org.hibernate.loader.Loader.list(Loader.java:2364)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496)
      at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
      at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231)
      at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264)
      at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
      at com.airtel.siva.config.ApplicationConfig.findAll(ApplicationConfig.java:84)
      at com.airtel.siva.Controllers.TaskController.newtasks(TaskController.java:154)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      atWARN : </p>
  
  <blockquote>
    <p>here is the code from where i am getting my session and creating the query for fetchin the data from my oracle database:-     </p>
  </blockquote>
  
  <pre><code>public static &lt;T&gt; Session getSession(Class&lt;T&gt; clazz) {
  
          try {   
              Configuration cfg = new Configuration().configure();    
              StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder()
                      .applySettings(cfg.getProperties());    
              SessionFactory sf = cfg.buildSessionFactory(builder.build());    
              Session session = sf.openSession();    
              session = getSession();
              session.beginTransaction();
              Query query = session.createQuery("from " + clazz.getName());                            
              List&lt;T&gt; listData = query.list();       
  
          } catch (Exception e) {
              logger.info("Error in creating session with Database", e);
          }    
  finally {
              if (session != null &amp;&amp; session.isOpen()) {
                  session.close();
              }    
          return listDAta;
          }
  </code></pre>