Sometime, we have store procedures which do not have any input and output parameters. We can execute such store procedures using Spring *[SimpleJdbcCall](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html)* class
You might get the following exception message:
```
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: Unable to determine the correct call signature - no procedure/function/signature for 'MY_STORE_PROCEDURE'
```
In such situation, We can bypass checking the signature of store procedure in metadata using method *withoutProcedureColumnMetaDataAccess*
```
SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)
.withProcedureName("MY_STORE_PROCEDURE")
.withoutProcedureColumnMetaDataAccess();
simpleJdbcCall.execute();
```
By calling the method withoutProcedureColumnMetaDataAccess we are bypassing any processing of the metadata lookups for potential parameters and only use the declared ones.
Comments
Post a Comment