camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandeepreddip <sandeepred...@gmail.com>
Subject Re: Camel 2.13.1 MyBatis Batch Insert to Oracle 11g Table ORA-00933: SQL command not properly ended
Date Tue, 22 Jul 2014 17:53:11 GMT
I ran the same case directly by obtaining a MyBatis SqlSessionFactory and it
ran fine. The only difference I see is the way I used it in the Camel Route
and API call is:

*From Camel Route:*
.to("mybatis:insertTransactionBids?statementType=*InsertList*&executorType=batch")


*MyBatis API call:*
*insert = session.insert("transactionBidsMapper.insertTransactionBids",
					transactionBidsURNResponse);*



private static void insertTransactionComplex() {
		SqlSession session = null;
		int insert = 0;
		try {
			TransactionBidsURNResponse  transactionBidsURNResponse  = new
TransactionBidsURNResponse ();
			TransactionBidURNs transactionBidURNs = new TransactionBidURNs();
		
transactionBidURNs.getTransactionBidURN().addAll(TransactionBidsDataGenerator.buildTransactionBidURNList());
			transactionBidsURNResponse.setTransactionBidURNs(transactionBidURNs);
			transactionBidsURNResponse.setMessageRequestID(new
BigInteger(String.valueOf(System.currentTimeMillis())));
			transactionBidsURNResponse.setHeader(buildHeader());
			
			session = getSqlSessionFactory().openSession();

			*insert = session.insert("transactionBidsMapper.insertTransactionBids",
					transactionBidsURNResponse);*
			session.commit();
			System.out.println(" Product insertTransactionBids " + insert);

		} catch (Exception e) {
			e.printStackTrace();
			session.rollback();
		} finally {
			// close session
			session.close();
		}
	}



--
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-tp5754248p5754254.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message