My application is running on SunAppServer 8.2 accessing Oracle 9i.
I have stripped my functions to a very simple module as shown below for easier debugging.
The connection to database is using JNDI referencing to the connection pooling setup SunAppServer.
I simulated 10 concurrent access to 1 simple JSP page (without any other codes, only 1 code to
access the Java method getID. I believe that the resultset and connection had been closed properly.
However, I still noticed that the open_cursor kept on going up and ultimately I get this error:
ORA-01000: maximum open cursors exceeded
It doesn't happen when I simulated only 1 user access. I can see that the open_cursor maintained at 1.
Any idea what happened? Any suggestions on what I should do to resolve the problem?
public class ConnectionBean
private static Connection con = null;
public static Connection getConnection()
InitialContext context = new InitialContext();
//Look up our data source
DataSource ds = (DataSource) context.lookup("jdbc/connpool");
//Allocate and use a connection from the pool
con = ds.getConnection();
catch (Exception e)
System.out.println("getConnection" + e);
public synchronized static void close() throws Exception
if (con != null)
con = null;