1

I have an Enterprise Application (ear) deployed in this configuration enviroment:

Weblogic 12c (12.1.1) + Oracle RAC 11g (release 2). Web Module is an MVC application, implemented with Struts 2 and Spring-framework (3.2.2) for core services. Spring JDBC is used for database access with simple JdbcTemplate for single statements and JtaTransactionManager for complex ones. In production environment after some time we got this exception: "ORA-01000 - Maximum open cursors exceeded" and server instance need to be restarted; it seems that open cursors increase more and more until they reach the maximum threshold set on Oracle. Increasing the threshold didn't solve the problem, it is set on 5000. JdbcTemplate is configured with Weblogic JNDI datasource (max size 30 and cache statement 10) so in cluster environment with 2 nodes, I expected the maximum number of cursors was 600 but it increases indefinitely. Could be a Spring problem with this configuration environment? Any ideas? Thanks.

  • 1
    "*ORA-01000 - Maximum open cursors exceeded*" is almost always cause by programmers not cleaning up resultsets, statements or connections. Each `ResultSet` that you create, uses a cursor on the backend. If you never close the `ResultSet`, the `Statement` that created it or the `Connection` that was used for the statement, those cursors never get closed. As you are using a connection pool, the connections are never physically closed, thus the cursors are never closed either. –  Sep 22 '14 at 13:14
  • You are right, but If I use Spring JDBC approach I don't need to explicity close the ResultSet, it is Spring managed. So, why do I have this problem? – user3907796 Sep 22 '14 at 13:53
  • facing same issue with spring jdbc template. Did you figure out the problem? – Deepak N Oct 14 '16 at 04:16

0 Answers0