<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: PutSQL: java.sql.BatchUpdateException: invalid batch command in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219106#M69559</link>
    <description>&lt;P&gt;Thanks Matt. &lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2017 23:22:13 GMT</pubDate>
    <dc:creator>mayank_rathi</dc:creator>
    <dc:date>2017-10-18T23:22:13Z</dc:date>
    <item>
      <title>PutSQL: java.sql.BatchUpdateException: invalid batch command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219104#M69557</link>
      <description>&lt;DIV&gt;Hello All,Can someone please help in understanding what I am doing wrong here?I am passing following values to PutSQL processor&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;sql.args.1.type &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;2005 &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;sql.args.1.value &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;V99|1.0|
E99|BILLING|1234567|11049532|350|201706|201709|
R03|350|11049532|4| |KK|174|A|07/27/1948| |322| |0|F| | |201712|201709|0|168900.56|0|0|0|0|40134|201712|0|0|316| |200402|0| | | | | | | | | |POPR_CUPDT| | | | | | | | | | | |0|0|2|200402|0| | | |
P03|0|1|0|0|199404|317|201711|08/17/2017| |0|201712|08/22/2017|322|0|
K06|201706|111.53|111.53|14.8|96.73|111.53|15||0|0|
K06|201707|117.48|117.48|15.85|101.63|117.48|15||0|0|
K06|201708|227.98|227.98|44.34|183.64|227.98|30||0|0| &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;

SQL query is:&lt;DIV&gt;select obds_loader.getmain(?) from dual &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;PutSQL processor is throwing below error. &lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;2017-10-12 13:56:39,129 ERROR [Timer-Driven Process Thread-1] o.apache.nifi.processors.standard.PutSQL PutSQL[id=0beb1a31-980d-38f9-fc0e-6c0ac7a68984]
 Failed to update database due to a failed batch update, 
java.sql.BatchUpdateException: invalid batch command. There were a total
 of 1 FlowFiles that failed, 0 that succeeded, and 0 that were not 
execute and will be routed to retry; : java.sql.BatchUpdateException: 
invalid batch command&lt;BR /&gt;java.sql.BatchUpdateException: invalid batch command&lt;BR /&gt;  at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10358)&lt;BR /&gt;  at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:230)&lt;BR /&gt;  at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)&lt;BR /&gt;  at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)&lt;BR /&gt;  at org.apache.nifi.processors.standard.PutSQL.lambda$null$10(PutSQL.java:348)&lt;BR /&gt;  at org.apache.nifi.processor.util.pattern.ExceptionHandler.execute(ExceptionHandler.java:127)&lt;BR /&gt;  at org.apache.nifi.processors.standard.PutSQL.lambda$new$12(PutSQL.java:346)&lt;BR /&gt;  at org.apache.nifi.processor.util.pattern.PutGroup.putFlowFiles(PutGroup.java:94)&lt;BR /&gt;  at org.apache.nifi.processor.util.pattern.Put.onTrigger(Put.java:101)&lt;BR /&gt;  at org.apache.nifi.processors.standard.PutSQL.lambda$onTrigger$20(PutSQL.java:554)&lt;BR /&gt;  at org.apache.nifi.processor.util.pattern.PartialFunctions.onTrigger(PartialFunctions.java:114)&lt;BR /&gt;  at org.apache.nifi.processor.util.pattern.RollbackOnFailure.onTrigger(RollbackOnFailure.java:184)&lt;BR /&gt;  at org.apache.nifi.processors.standard.PutSQL.onTrigger(PutSQL.java:554)&lt;BR /&gt;  at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1119)&lt;BR /&gt;  at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)&lt;BR /&gt;  at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)&lt;BR /&gt;  at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)&lt;BR /&gt;  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)&lt;BR /&gt;  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)&lt;BR /&gt;  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)&lt;BR /&gt;  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;BR /&gt;  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;BR /&gt;  at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Oct 2017 01:20:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219104#M69557</guid>
      <dc:creator>mayank_rathi</dc:creator>
      <dc:date>2017-10-13T01:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: PutSQL: java.sql.BatchUpdateException: invalid batch command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219105#M69558</link>
      <description>&lt;P&gt;Are you expecting a result set from the SELECT statement? If so then you might be better off with building a SQL query with the CLOB value inline (probably quoted and/or padded with rpad I imagine) and using ExecuteSQL vs PutSQL. The former is for queries that return result sets, the latter is for statements that don't (like INSERT).&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 01:40:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219105#M69558</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-10-13T01:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: PutSQL: java.sql.BatchUpdateException: invalid batch command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219106#M69559</link>
      <description>&lt;P&gt;Thanks Matt. &lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 23:22:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PutSQL-java-sql-BatchUpdateException-invalid-batch-command/m-p/219106#M69559</guid>
      <dc:creator>mayank_rathi</dc:creator>
      <dc:date>2017-10-18T23:22:13Z</dc:date>
    </item>
  </channel>
</rss>

