Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-2990

Sqoop(oracle) export [updateTableToOracle] with "--update-mode allowinsert" : app fails with java.sql.SQLException: Missing IN or OUT parameter at index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.7
    • None
    • None

    Description

      Sqoop(oracle) export updateTableToOracle with "--update-mode allowinsert" : app fails with java.sql.SQLException: Missing IN or OUT parameter at index.
      "--update-mode updateonly" option works fine.

      sqoop export --connect jdbc:oracle:thin:@172.25.16.82:1521/XE --username sqoop --password sqoop --table TEST_BUG50146 --update-key CUSTOMER_ID --update-mode allowinsert --export-dir /user/ambari-qa/Employees/employee
      
      MR job fails with
      
      org.apache.hadoop.mapred.TaskAttemptListenerImpl: Progress of TaskAttempt attempt_1464136533286_0050_m_000000_0 is : 0.0
      2016-05-25 01:35:29,288 FATAL [IPC Server handler 8 on 47839] org.apache.hadoop.mapred.TaskAttemptListenerImpl: Task: attempt_1464136533286_0050_m_000000_0 - exited : java.io.IOException: java.sql.SQLException: Missing IN or OUT parameter at index:: 13
      	at org.apache.sqoop.mapreduce.AsyncSqlRecordWriter.close(AsyncSqlRecordWriter.java:197)
      	at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.close(MapTask.java:670)
      	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:793)
      	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
      	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:415)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
      	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
      Caused by: java.sql.SQLException: Missing IN or OUT parameter at index:: 13
      	at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1821)
      	at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:10010)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.addBatch(OraclePreparedStatementWrapper.java:1358)
      	at org.apache.sqoop.mapreduce.UpdateOutputFormat$UpdateRecordWriter.getPreparedStatement(UpdateOutputFormat.java:174)
      	at org.apache.sqoop.mapreduce.AsyncSqlRecordWriter.execUpdate(AsyncSqlRecordWriter.java:153)
      	at org.apache.sqoop.mapreduce.AsyncSqlRecordWriter.close(AsyncSqlRecordWriter.java:194)
      	... 8 more
      

      Attachments

        1. SQOOP-2990.V0.patch
          1.0 kB
          Sowmya Ramesh

        Issue Links

          Activity

            People

              sowmyaramesh Sowmya Ramesh
              sowmyaramesh Sowmya Ramesh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: