Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring-jdbc 5.0.5 NamedParameterJdbcTemplate.batchUpdate ORA-01000

After migrating from Spring 4.1.7 to Spring 5.0.5 we have ORA-01000: maximum open cursors exceeded when using with Oracle 12c and ojdbc7 driver

Exception raised after following code

@SuppressWarnings("unchecked")
private void executeBatch(Map<String, Object>[] updateBatchParams) {
 int[] updateResults = namedJdbcTemplate.batchUpdate(SQL, updateBatchParams);

The issue is very similar to https://jira.spring.io/browse/SPR-16139.

But we dont have ability to update ojdbc driver.

Any ideas how the issue can be fixed?

P.S. Created an issue in Spring jira

like image 516
yanefedor Avatar asked Oct 16 '25 13:10

yanefedor


1 Answers

Juergen Hoeller:

There hasn't been any recent work on this. Since this is effectively a bug in the Oracle JDBC driver, I'm afraid we won't be introducing a workaround for an older driver at this point.

You could try setting spring.jdbc.getParameterType.ignore=true as a system property on in a spring.properties file in the root of your classpath, or use spring-jdbc-4.3.17 for the time being... with all other jars set to 5.0.6 (which isn't officially supported but should work fine in practice). I strongly recommend upgrading the JDBC driver though.

like image 181
yanefedor Avatar answered Oct 18 '25 06:10

yanefedor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!