Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ora-0100 max cursor exceed

ora-0100 max cursor exceed

From: Andre Grosse <ag17_at_inf.tu-dresden.de>
Date: Mon, 17 Sep 2001 23:21:46 +0200
Message-ID: <3BA6696A.8040607@inf.tu-dresden.de>


hi,

i use a connection pool, in oratest.init is cursor-limit on 300. after 300 createStatements i get an ora0100 max cursor exceed exception, but i close stmt and rs correctly?!!!
is there a known problem with JDBC and Oracle9i on linux? without rs.next() in the following test-code there is no exception.

   private static void test(final ConnectionPool pool) {

     String sql = "SELECT 1 AS muell FROM NaviContent";
     System.out.println("TEST");
     Connection con = null;
     Statement stmt = null;
     ResultSet rs = null;
     for (int i = 2000; i-- > 0; )
     try {
       System.out.println("TEST: " + i);
       con = pool.getConnection();
       stmt = con.createStatement();
       rs = stmt.executeQuery(sql);
       rs.next();

}
catch (Exception e) { System.out.println("Fehler in Datenbankabfrage..."); e.printStackTrace();
}
finally { try { stmt.close(); stmt = null; } catch (Exception e) { } try { rs.close(); rs = null; } catch (Exception e) { } pool.releaseConnection(con);
}

   }
-- 
Andre Grosse
Received on Mon Sep 17 2001 - 16:21:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US