Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> connection pooling exception
I got the following using the Oracle JDBC thin driver and connection
pooling. Is it becasue of all connection is used in the pool?
<2001-11-14 ??06?35?48?> <Error> <HTTP>
<[WebAppServletContext(4368107,DefaultWebApp_wbserver)] Servlet failed with
Exception
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:82)
at java.util.Stack.pop(Stack.java:64)
at
oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCac
heImpl.java:183)
at
oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCac
heImpl.java:157)
at myServlet.service(aeAction.java:101)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
Here is my java code to open database connection :
OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ocpds.setURL("jdbc:oracle:thin:@"+ dbHost + ":" + dbPort + ":" + dbName); ocpds.setUser(usrNm); ocpds.setPassword(usrPw); // Associate it with the Cache OracleConnectionCacheImpl ods = newOracleConnectionCacheImpl(ocpds);
// Set the Max Limit ods.setMaxLimit (20); Connection con = ods.getConnection();Received on Thu Nov 15 2001 - 04:39:18 CST