I've found that if you reference a property in a parameterClass or an entry in a parameterMap more than once, strange behavior results.
For example (where ... = some legal SQL fragment): <select id="whatever" parameterClass="SomeClass"> ... #SomeIntProperty# ... #SomeOtherIntProperty# ... #SomeIntProperty# ... </select> could produce some sort of SQL error (types of errors I've gotten are different) or even an error within iBATIS itself before the SQL is sent to the database. I *think* the reason is that iBATIS is pulling information from the parameterClass or parameterMap by index after mapping the parameters to SqlParameters. The workaround is to do something like this: <select id="whatever" parameterClass="SomeClass"> declare @SP int select @SP = #SomeIntProperty# ... @SP ... #SomeOtherIntProperty# ... @SP ... </select> Hope this saves someone some time. Can anyone confirm this issue? If so, I can enter into Jira. - Kit