Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-18153

Text File Input step - Error Handling issue. Failure to write to file due to java.io.UnsupportedEncodingException

    XMLWordPrintable

    Details

    • Story Points:
      0
    • PDI Sub-component:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Sprint Team:
      Tatooine (Maint)
    • Steps to Reproduce:
      Hide
      1. Download following files:
        1. read_file_job.kjb
        2. read_file_trans.ktr
        3. sales_data.csv
      1. Save the ETL files to a repository and the .csv file to a location accessible by the Pentaho server.
      2. Start Spoon, open .kjb file.
      3. Open .ktr file, edit Text File Input step and change the location of the .csv file in File tab.
      4. Switch to Error Handling tab and modify Warning Files directory, Error Files directory and Failing line numbers files directory locations to the appropriate locations on your Pentaho server.
      5. Save transformation.
      6. Run the transformation with run configuration set to server. Transformation succeeds and creates .line file and write a line number matching a failed line (line #3).
      7. Switch to the job and execute the job either locally or with execution to a server (create a slave server for Pentaho server to which Spoon is connected).
      8. .line file is created but the failed record's line number is not written to file and exception is produced  in the server log.
      Show
      Download following files: read_file_job.kjb read_file_trans.ktr sales_data.csv Save the ETL files to a repository and the .csv file to a location accessible by the Pentaho server. Start Spoon, open .kjb file. Open .ktr file, edit Text File Input step and change the location of the .csv file in File  tab. Switch to Error Handling tab and modify Warning Files directory, Error Files directory and Failing line numbers files directory locations to the appropriate locations on your Pentaho server. Save transformation. Run the transformation with run configuration set to server. Transformation succeeds and creates .line file and write a line number matching a failed line (line #3). Switch to the job and execute the job either locally or with execution to a server (create a slave server for Pentaho server to which Spoon is connected). .line file is created but the failed record's line number is not written to file and exception is produced  in the server log.

      Description

      Error handling in the Text File Input step fails to write a failed record line number to the .line file when a transformation is executed as part of the job against the Pentaho server.

      The exception is as follows:

      2019/06/20 15:55:12 - read_file_job - Start of job execution
      2019/06/20 15:55:12 - read_file_job - Start of job execution
      2019/06/20 15:55:12 - read_file_job - Starting entry [Read file]
      2019/06/20 15:55:12 - Read file - Loading transformation from repository [read_file_trans] in directory [/home/admin]2019/06/20 15:55:12 - Read file - Using run configuration [Pentaho local]
      2019/06/20 15:55:12 - Read file - Using legacy execution engine
      2019/06/20 15:55:12 - read_file_trans - Dispatching started for transformation [read_file_trans]
      2019/06/20 15:55:12 - Text file input.0 - Opening file: [file:///C:/stuff/Pentaho] stuff/customers/Advance America/sales_data.csv
      2019/06/20 15:55:12 - Text file input.0 - ERROR (version 7.1.0.18-169, build 1 from 2018-11-13 12.47.01 by buildguy) : Unexpected error
      2019/06/20 15:55:12 - Text file input.0 - ERROR (version 7.1.0.18-169, build 1 from 2018-11-13 12.47.01 by buildguy) : org.pentaho.di.core.exception.KettleException: 
      2019/06/20 15:55:12 - Text file input.0 - Error converting line
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - Could not create write line:3
      2019/06/20 15:55:12 - Text file input.0 - 2019/06/20 15:55:12 - Text file input.0 - Could not create FileErrorHandler for [file:file:///C:/stuff/Pentaho|file://file:/C:/stuff/Pentaho] stuff/customers/Advance America/Errors/sales_data.csv.20062019-155512.line
      2019/06/20 15:55:12 - Text file input.0 - 2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - 2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.steps.fileinput.text.TextFileInputUtils.convertLineToRow(TextFileInputUtils.java:547)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.steps.fileinput.text.TextFileInputReader.readRow(TextFileInputReader.java:310)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.steps.fileinput.BaseFileInputStep.processRow(BaseFileInputStep.java:211)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
      2019/06/20 15:55:12 - Text file input.0 - at java.lang.Thread.run(Thread.java:745)
      2019/06/20 15:55:12 - Text file input.0 - Caused by: org.pentaho.di.core.exception.KettleException: 
      2019/06/20 15:55:12 - Text file input.0 - Could not create write line:32019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - Could not create FileErrorHandler for [file:file:///C:/stuff/Pentaho|file://file:/C:/stuff/Pentaho] stuff/customers/Advance America/Errors/sales_data.csv.20062019-155512.line
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.errorhandling.FileErrorHandlerContentLineNumber.handleLineError(FileErrorHandlerContentLineNumber.java:46)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.errorhandling.CompositeFileErrorHandler.handleLineError(CompositeFileErrorHandler.java:46)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.steps.fileinput.text.TextFileInputUtils.convertLineToRow(TextFileInputUtils.java:447)
      2019/06/20 15:55:12 - Text file input.0 - ... 4 more
      2019/06/20 15:55:12 - Text file input.0 - Caused by: org.pentaho.di.core.exception.KettleException: 
      2019/06/20 15:55:12 - Text file input.0 - Could not create FileErrorHandler for [file:file:///C:/stuff/Pentaho|file://file:/C:/stuff/Pentaho] stuff/customers/Advance America/Errors/sales_data.csv.20062019-155512.line
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - 
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.errorhandling.AbstractFileErrorHandler.getWriter(AbstractFileErrorHandler.java:130)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.errorhandling.FileErrorHandlerContentLineNumber.handleLineError(FileErrorHandlerContentLineNumber.java:43)
      2019/06/20 15:55:12 - Text file input.0 - ... 6 more2019/06/20 15:55:12 - Text file input.0 - Caused by: java.io.UnsupportedEncodingException: 
      2019/06/20 15:55:12 - Text file input.0 - at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:61)
      2019/06/20 15:55:12 - Text file input.0 - at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:100)
      2019/06/20 15:55:12 - Text file input.0 - at org.pentaho.di.trans.step.errorhandling.AbstractFileErrorHandler.getWriter(AbstractFileErrorHandler.java:125)
      2019/06/20 15:55:12 - Text file input.0 - ... 7 more
      2019/06/20 15:55:12 - Text file input.0 - Finished processing (I=4, O=0, R=0, W=2, U=1, E=1)
      2019/06/20 15:55:12 - read_file_trans - Transformation detected one or more steps with errors.
      2019/06/20 15:55:12 - Dummy (do nothing).0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
      2019/06/20 15:55:12 - read_file_trans - ERROR (version 7.1.0.18-169, build 1 from 2018-11-13 12.47.01 by buildguy) : Errors detected!
      2019/06/20 15:55:12 - read_file_trans - Transformation is killing the other steps!
      2019/06/20 15:55:12 - read_file_trans - ERROR (version 7.1.0.18-169, build 1 from 2018-11-13 12.47.01 by buildguy) : Errors detected!
      2019/06/20 15:55:12 - read_file_trans - ERROR (version 7.1.0.18-169, build 1 from 2018-11-13 12.47.01 by buildguy) : Errors detected!
      2019/06/20 15:55:12 - read_file_job - Finished job entry [Read file] (result=[false])
      2019/06/20 15:55:12 - read_file_job - Job execution finished
      

        Attachments

        1. read_file_job.kjb
          13 kB
        2. read_file_trans.ktr
          26 kB
        3. sales_data.csv
          2 kB

          Activity

            People

            Assignee:
            rrosinha Ricardo Rosinha
            Reporter:
            ikirianov Igor Kirianov
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: