ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Alexander <D.Alexan...@lse.ac.uk>
Subject Error while applying a parameter map: Invalid column index.
Date Thu, 01 May 2008 11:11:21 GMT

Hi,

Two problems here, first the error itself, second I haven't yet found how to
get more info from Ibatis to debug this myself.

Maybe I've missed something obvious.

--- The error occurred while applying a parameter map.
--- Check the getFoo-InlineParameterMap.
--- Check the parameter mapping for the 'value' property.
--- Cause: java.sql.SQLException: Invalid column index

The SQL query has a long WHERE clause but only one parameter.

    <sql id="phdStudent-fragment">
                select
                        [lots of fields]
                from
                        [lots of tables]
                where
                        [lots of ANDed clauses to inner join the tables and
filter the results (but no #params#)]
    </sql>

    <select id="getFoo"
            parameterClass="string"
            resultMap="get-foo-result">
                <include refid="foo-fragment"/>
                        and
                        F.FOO_CODE = #value#
                    order by F.FOO_NAME
    </select>

Would be good at least to see the SQL being passed into the
PreparedStatement.

If anyone knows how to get Ibatis to output that or notices an obvious
mistake above, please let me know.

Thanks,
D.




-- 
View this message in context: http://www.nabble.com/Error-while-applying-a-parameter-map%3A-Invalid-column-index.-tp16993214p16993214.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message