powered by Jive Software

?the problem of "maximum open cursors exceeded"

When i call “createEntry” from client manytimes. there is some problem in “DB connection”

it can’'t free the connection. the log file like:


2005.08.04 12:39:44 org.jivesoftware.messenger.roster.RosterItemProvider.updateItem(RosterItemProvid er.java:154)

java.sql.SQLException: ORA-01000: maximum open cursors exceeded

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)

at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:120)

at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:586)

at oracle.jdbc.driver.OracleStatement.(OraclePreparedStatement.java:92)

at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.ja va:950)

at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:802)

at org.jivesoftware.database.AbstractConnection.prepareStatement(AbstractConnectio n.java:36)

at org.jivesoftware.messenger.roster.RosterItemProvider.insertGroups(RosterItemPro vider.java:334)

at org.jivesoftware.messenger.roster.RosterItemProvider.updateItem(RosterItemProvi der.java:150)

at org.jivesoftware.messenger.roster.Roster.updateRosterItem(Roster.java:306)

Hmmm…

Maximum open cursors…

First guess/shot:

In your Oracle init isn’'t there a parm to specify open cursors? Try bumping it up and restarting your db instance.

It would seem that the code is not calling close on the prepared statement often enough!

see: http://forum.java.sun.com/thread.jspa?threadID=374653&messageID=3382629

I looked at the code on RosterItemProvider and there are 3 separate calls to prepare statement.

pstmt = con.prepareStatement(UPDATE_ROSTER_ITEM);

pstmt = con.prepareStatement(DELETE_ROSTER_ITEM_GROUPS);

(insertGroup method)

pstmt = con.prepareStatement(CREATE_ROSTER_ITEM_GROUPS);

however there are only 2 explicit calls to close the prepared statement. I have attached

an update to the RosterItemProvider. Can you make a build with this update and try your test again. Let me know the result.

Regards,

Conor.

Hey Conor,

Thanks for pointing this out. In the next nightly build you will find your fix implemented.

Thanks,

– Gato