Ich versuche, eine gespeicherte Prozedur, die Standard (optional) Argumente hat, ohne sie zu übergeben, und es funktioniert nicht. Im Wesentlichen das gleiche Problem wie beschrieben here.Spring SimpleJdbcCall default (optional) Argumente
Mein Code:
SqlParameterSource in = new MapSqlParameterSource()
.addValue("ownname", "USER")
.addValue("tabname", cachedTableName)
.addValue("estimate_percent", 20)
.addValue("method_opt", "FOR ALL COLUMNS SIZE 1")
.addValue("degree", 0)
.addValue("granularity", "AUTO")
.addValue("cascade", Boolean.TRUE)
.addValue("no_invalidate", Boolean.FALSE)
.addValue("force", Boolean.FALSE);
Und ich bekomme eine Ausnahme:
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: Required input parameter 'PARTNAME' is missing
at org.springframework.jdbc.core.CallableStatementCreatorFactory$CallableStatementCreatorImpl.createCallableStatement(CallableStatementCreatorFactory.java:209)
Wo Partname ist ein optionaler Parameter nach this. Auch bestätigt durch die Tatsache, dass ich diese Prozedur ohne das Argument PARTNAME manuell ausführen kann.