Title: Stored procedure call throwing UncategorizedSQLException

I have a stored procedure with 3 IN parameters and 1 OUT parameter. The OUT parameter is a REF CURSOR.

Here's my sqlMap entry:

        <resultMap id="list-result" class="com.Result">
                <result property="col1" column="COL1"/>
                <result property="col2" column="COL2"/>
                <result property="col3" column="COL3"/>
        </resultMap>

        <parameterMap id="proc_param" class="com.Filter">
                <parameter property="filter1" mode="IN" jdbcType="NUMBER" javaType="java.lang.Long"/>
                <parameter property="filter2" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String"/>
                <parameter property="filter3" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String"/>
        </parameterMap>

        <procedure id="listResults" parameterMap="proc_param"  resultMap="list-result">
                {call Procedure1(?,?,?)}
        </procedure>

I get UncategorizedSQLException when I execute the above sqlMap. I am not sure what I am doing wrong.

Questions:
2. The table column for filter1 is NUMBER(15), table column for filter2 is CHAR(1) and the table column for filter3 is VARCHAR2(10). Is my jdbcType representation correct?

3. I am passing in only 3 IN parameters to Procedure1. Do I need to pass in another '?' for OUT parameter?. If yes, do I need to change the com.Filter class to have another attribute for the OUT parameter and what should be the corresponding java type? I was expecting the OUT param to tie into the resultMap.

Please help.

Thanks,
Satish

Reply via email to