Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We are facing the maximum open cursor issue [SPR-17001] #21539

Closed
spring-projects-issues opened this issue Jul 2, 2018 · 11 comments
Closed

We are facing the maximum open cursor issue [SPR-17001] #21539

spring-projects-issues opened this issue Jul 2, 2018 · 11 comments
Labels
for: stackoverflow in: data status: invalid

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 2, 2018

A V Vamsi krishna opened SPR-17001 and commented

+Error stack trace+

 ** 
|
| |
Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded 

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) 
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) 
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059) 
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) 
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) 
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) 
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:220) 
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:48) 
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:938) 
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150) 
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798) 
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4901) 
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5631) 
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1385) 
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:105) 
at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1134) 
at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1131) 
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1079) |
|

 


Reference URL: https://stackoverflow.com/questions/47044033/spring-5-0-1-namedjdbctemplate-batchupdate-ora-01000-maximum-open-cursors-excee

Issue Links:

  • #20687 Doc: ParameterMetaData.getParameterType performance on Oracle 12c
@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

A V Vamsi krishna commented

Team,

 

Please update us if you are looking for additional details.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

A V Vamsi krishna commented

Hi Team,

 

Could you please give an update on the above issue.

We are using the 

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production  in our environment

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

A V Vamsi krishna commented

Hi Team,

Could you treat this as priority. We are facing the issue in our production environment.

 

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

Juergen Hoeller commented

Do the steps in #20687 help:

  1. Upgraded Oracle JDBC driver to ojdbc8.jar version 12.2.0.1
  2. Create spring.properties with spring.jdbc.getParameterType.ignore=true

There is a corresponding note in our reference documentation since 5.0.2. Beyond that, we are not aware of any remaining issues on our side. It's effectively an Oracle JDBC driver bug with the use of the standard java.sql.ParameterMetaData.getParameterType() API which can be resolved through the steps above.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

A V Vamsi krishna commented

Hi Juergen,

Thanks for the update. As we mentioned earlier we are using the below Oracle DB version

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit.

Currently we are using ojdbc14. jar version 10.2.0.2.0

Can we use the ojdbc8.jar version 12.2.0.1 in this environment ?

 

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 3, 2018

Juergen Hoeller commented

As far as I know, you can use the Oracle 12 JDBC driver against an Oracle 11 DBMS. However, I'm no expert there; please check with your database administrator.

Even on its own, spring.jdbc.getParameterType.ignore=true should get you pretty far in avoiding that driver bug. You may set that flag in a spring.properties file in the root of your classpath or as a JVM system property.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jul 10, 2018

A V Vamsi krishna commented

Hi Juergen,

Currently in our application we are using JDBCTemplate for all DB interactions. For each method call, we are creating new JDBCTemplate, using it and not closing anything (JDBC resources) from application side. Is there any possibility that it may keep Cursors open?.Can we create any number of JDBCTemplate and it will have no impact on number of open cursors count?

Regards,

Ram Lodhi.

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage in: data and removed type: bug labels Jan 11, 2019
@sabinsumghershanan
Copy link

@sabinsumghershanan sabinsumghershanan commented Mar 8, 2020

@jhoeller I am also facing the issue with open cursors in my application. I am using spring version 5.0.16-RELEASE and ojdbc6 jar and java1.7. The open cursor value has been set to 400 and connction pool value is 40. But still the open cursors get exceeded. Could you please provide some recommendation for the same?

@iKoru
Copy link

@iKoru iKoru commented May 28, 2020

@jhoeller Me, too. I'm on Spring boot 2.2.5.RELEASE(maybe based on Spring 5.2.6.RELEASE or something) and ojdbc8.jar and java 1.8.

@pkumaravel
Copy link

@pkumaravel pkumaravel commented Jul 21, 2020

me too facing same issue using Spring JDBC 5.1.3.RELEASE with ojdbc7 driver on a Oracle 12c database, any suggestion or solution.

@sabinsumghershanan
Copy link

@sabinsumghershanan sabinsumghershanan commented Aug 28, 2020

@pkumaravel I resolved the issue by adding spring.jdbc.getParameterType.ignore=true, as a custom property in was. You can also add it as a spring.properties file in the root of the classpath of your project.

@bclozel bclozel closed this as completed Feb 18, 2022
@bclozel bclozel added for: stackoverflow status: invalid and removed status: waiting-for-triage labels Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow in: data status: invalid
Projects
None yet
Development

No branches or pull requests

5 participants