Hi, I found out what the issue is:

  The issue lies with the setting below in MyBatis Configuration file:
*<setting name="useGeneratedKeys" value="false" /> *
On debugging end to end, I noticed that an exception is thrown at Line No:
103 batchResult.setUpdateCounts(stmt.executeBatch()); in BatchExecutor.java
(myBatis 3.2.7 jar). Since the option to use useGeneratedKeys is set to true
in MyBatis Configuration, what happens at this point is: RETURNING ROWID
INTO ? is added to the end of the query and this was throwing an exception.

I changed the to false and it worked.

As a note, do not set useGeneratedKeys to true unless you are sure that
every query needs the returned ROWID. You can set the useGeneratedKeys
option in the mapper files for more control e.g. below:

<insert id="insertSomething" useGeneratedKeys="true"
    keyProperty="id">

</insert>



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-13-1-MyBatis-Batch-Insert-to-Oracle-11g-Table-ORA-00933-SQL-command-not-properly-ended-tp5754248p5754542.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to