Hi

Thanks for sharing your findings and the solution.

On Tue, Jul 29, 2014 at 2:36 AM, sandp <[email protected]> wrote:
> 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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to