I use SimpleJdbcCall to call stored procedure in Oracle.

But I found that when compile() non exists procedure, it simply success return. After some digging, I found the following codes that cause this issue.

https://github.com/spring-projects/spring-framework/blob/198d64d5396346d1ce33ca9a80df34fafb2c851f/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java#L370-L375

The GenericCallMetaDataProvider believes that Oracle will not return information about stored procedures, so it just ignores the problem.

I tested this and found that the Oracle JDBC driver did return the information about the stored procedures.

  • Oracle Server: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 (Sorry, I only have this version)
  • Oracle JDBC Driver: com.oracle.database.jdbc:ojdbc8:[12.2.0.1,18.3.0.0,19.3.0.0,19.6.0.0,19.7.0.0] from maven central

Please make SimpleJdbcCall.compile() throw exception in this situation. Or provide some way to enforce this behavior.

Comment From: loiclefevre

@moonfruit, do you remember which procedure wasn't found? was it a home made one or an Oracle standard one?

Comment From: snicoll

I tested this and found that the Oracle JDBC driver did return the information about the stored procedures.

How did you test that? The code that you've referenced does this only if the procedure list is empty. It would be helpful to share a test case we can run to reproduce the issue.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.