Oracle error

Posted on 2003-03-29
Medium Priority
Last Modified: 2011-10-03

i read about you giving oracle solutions so it would be excellent if you could help me on this:

i developp an aplication with

-oracle 8i.
-apache web server
-jbuilder for servlets

First of all, i use a pool of connections( free source by Phillip Hanna).

I get "resultset exhausted"(if you need the oracle error code i will give it to you) when i'm calling various servlets.
Of course it's not that basic error which occurs when you exceed the number of lines  ( i use while(rs.next()) ).

To be short, when i want to exacute a query i call a very simple function which:
 1. gives me the resultset of that querry and
 2. releases the connection(pool.release) it used to get a statement to exectute that query.

Then i use the resultset in a "while" loop to do different things. After the loop:
- i close the resultset
- close the statement( i am forced to close it after the loop, otherwise i could not make rs.next() )

The problem is that the step 2 of the function could block the result set i'm using in the loop. So maybe i'm trying to acces i line but the resultset can't no more becouse of what happens in the release method.

The second possibility is to use a unique static connection object. In this case I get "maximum number of cursors exceeded" which is normal if i open, say, 20 resultsets.

So, what could i do to solve this ?

Or do you have any suggestion about classic multi-user connection methods to avoid errors?

For any questions, please let me know and i'ill give you all the details you need.


Vlad BALAN - INSA Lyon, France

Here's my DB acces function :

 public static void executeQuery(String sql)throws Exception{
      Connection con=getConnection();
      Statement st=con.createStatement();
      st.execute("alter session set nls_numeric_characters='.,'");
    catch(Exception e){
      System.out.println("Error trying to execute your query :\n" + sql + "\n The exception is:" +e);
      throw e;


  public static Connection getConnection()throws Exception{

          pool = new ConnectionPool(new OdbcConnectionFactory(""));
        return pool.getConnection();


Question by:balanvlad
  • 2
LVL 30

Accepted Solution

Mayank S earned 300 total points
ID: 8236383
>> Connection con=getConnection();

Connection con = DriverManager.getConnection ( "jdbc:odbc:<database-name>", "username", "password" ) ;

Expert Comment

ID: 9446669
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 30

Expert Comment

by:Mayank S
ID: 9451830
Recommendation: Accept mayankeagle's comment as answer.

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question