We have a Oracle procedure call done using iBatis. One of the IN parameters to the procedure is a VARCHAR2 datatype in procedure and is java.lang.String in Service/DAO layers.
The procedure fails whenever this input parameter is passed with NULL value. When a value is passed, then the procedure gets called without any errors.
For this procedure parameter (which is nullable) within the parametermap
, we set the attribute as jdbctype="java.sql.Types.NULL"
and it started working.
Is this the correct solution ?
The database connection is established using connection pool (dbcp) created in Tomcat6 server.