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 -> Getting Oracle ORA-00018 (max sessions) without opening connections?!

Getting Oracle ORA-00018 (max sessions) without opening connections?!

From: news.telus.net <mspronk_at_yahoo.com>
Date: Wed, 13 Mar 2002 17:28:57 GMT
Message-ID: <t%Lj8.13747$%6.574957@news2.telusplanet.net>


Hi there,

I'm experiencing a problem that seems like it couldn't be happening. Even though I am not creating a connection, I'm getting an Oracle 'maximum number of sessions exceeded' error. All I'm doing is creating a preparedCall, executing it, and getting the resultset from it.

Here are more details:

When running our application under load, we're getting the following exception in our log..

Exception in ActivityDAOHelper.buildUnreadPoints(...): java.sql.SQLException: ORA-00018: maximum number of sessions exceeded

Based on the signature of the log entry, this exception must have been raised within the try clause of this method:

private static List buildUnreadPoints(Connection conn, UserVO user, Locale locale) throws SQLException {
  PreparedStatement stmt = null;
  ResultSet rs = null;
  List result = null;

  try {
    String query = buildUnreadPointsQuery(locale);     stmt = conn.prepareCall(query);
    stmt.setInt(1, user.getRowId());
    stmt.execute();
    rs = stmt.getResultSet();
    result = buildUnreadPointsList(rs);
} catch (SQLException exc) {

    System.out.println("Exception querying endorsements in

           ActivityDAOHelper.buildUnreadPoints(...): "+exc);     throw exc;
} finally {

     releaseResources(rs, stmt);
  }

  return result;
}

The BuildUnreadPointsQuery performs simple String manipulation and also uses the Locale after which it returns a straightfoward SELECT..FROM..WHERE query, and the buildUnreadPointsList method goes through the resultset and simply builds an object based on the resultset.

I don't understand how the actions performed in that code can create an ORA-00018 exception?

We're using WebSphere 4.0.2, connection pooling, and Oracle 8.1.7.0.0 with a JDBC thin client.

Martijn. Received on Wed Mar 13 2002 - 11:28:57 CST

Original text of this message

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