It's choking on the lastname value being read off a magnetic strip. Here is
the relevant portion of the map
Here is the parameter map:
<parameterMap class="com.sps.dao.ibatis.DataWrapper"
id="SwipedCreditCard_procedureMap">
......
<parameter property="data.name.firstName" mode="IN"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<parameter property="data.name.lastName" mode="IN"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<parameter property="data.name.middleInitial" mode="IN"
javaType="java.lang.String" jdbcType="VARCHAR"/>
.......
</parameterMap>
And the exception:
[2009-09-03 13:20:28,502] [http-80-Processor25] [ERROR] -
[IBatisStoredProcDAO.insert] [failed to insert record for class
com.hteinc.op.services.types.SwipedCreditCard]
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/op/services/types/SwipedCreditCard.xml.
--- The error occurred while applying a parameter map.
--- Check the SwipedCreditCard.SwipedCreditCard_procedureMap.
--- Check the statement (update procedure failed).
--- Cause: java.sql.SQLException: [SQL0104] Token 'O' was not valid. Valid
tokens: (.
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59)
Thanks for looking.
nmaves wrote:
>
> Post your parameter map and the actual exception you are getting.
>
> On Tue, Sep 8, 2009 at 7:59 AM, jimmymac
> <[email protected]>wrote:
>
>>
>> I seem to be having an issue with mapping and stored procedures. I'm
>> passing
>> in a value " O'Malley ". Shouldn't the use of a prepared statement
>> handle
>> the apostrophe? The API is returning a message of invalid character O'
>> from
>> the DB2 database.
>>
>> [code]
>> <procedure id="SwipedCreditCard_insert"
>> parameterMap="SwipedCreditCard_procedureMap">
>> {call ${sp.lib}.KLSCCAPI(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
>> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}
>> </procedure>
>> [/code]
>> --
>> View this message in context:
>> http://www.nabble.com/IBatis-%2B-Stored-Procedures-tp25346833p25346833.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/IBatis-%2B-Stored-Procedures-tp25346833p25347487.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]