Java - Oracle Open Cursors Problem

Hi,

I am getting the following error in my application:ORA-01000: maximum open cursors exceeded. Actually I'm using connection pool mechanism ( nothing but a Vector with the connection objects maintained ). The same connection is being used for processing the messages in the sequence. If I process more than 100 messages ( approximately 4 queries per message), 2 messages are not stored into DB for each set of 100. I'm closing the Statement object in finally block. No ResultSet object is used. In the init.ora I have set Open_Cursors as 500. Please help me to solve this issue.

Thanks in advance.

Regards,

R.Rajapriya.

[662 byte] By [Rajapriya.Ra] at [2007-10-3 3:10:44]
# 1

You tried to open too many cursors at once. Each user is restricted to the number of cursors open based on the OPEN_CURSORS parameter in the initialization file.

Action:

The options to resolve this Oracle error are:

1. Try to close cursors that you are no longer using before opening new cursors.

2. You may need to shut down Oracle, increase the OPEN_CURSORS parameter in the initialization file, and restart Oracle.

java_2006a at 2007-7-14 21:01:32 > top of Java-index,Java Essentials,Java Programming...
# 2
Thanks for your reply.Changing the OPEN_CURSORS parameter can give only the temporary solution only. If I put as 1000, again it will create problem while processing 1000 messages sequence.Please tell me how can I close the unused cursors?
Rajapriya.Ra at 2007-7-14 21:01:32 > top of Java-index,Java Essentials,Java Programming...
# 3
http://www.theserverside.com/discussions/thread.tss?thread_id=25583 http://www.inetsoftware.de/products/jdbc/oracle/manual.asp#The%20parameter%20opencursors%20and%20PreparedStatements
java_2006a at 2007-7-14 21:01:32 > top of Java-index,Java Essentials,Java Programming...