Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Error reading data from step TextFileInput

  1. #1
    Join Date
    Oct 2007
    Posts
    10

    Default Error reading data from step TextFileInput

    I am trying to create some custom components using Kettle API... am using TextFileInput in one of my components to load some fixed length text file...
    It can't be done!!!

    From the log console I received the following error:
    Error initializing step [Reading data from [C:\TEMP\DATA\Filexxxxx]]
    -Reading data from [C:\TEMP\DATA\Filexxxxx] - java.lang.NullPointerException

    What am i doing wrong??? can somebody help me??

    Thanks a lot!

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    "My uncle's car broke down, it just won't start anymore. Do you know what's wrong with it."

    Same type of question... without more information you're not going to get far. A hunch would be that you didn't use all required "set" methods on the metadata. In spoon this is taken care of by spoon, but if you go directly via the API you have to make sure all values are properly set.

    I would suggest to debug it a bit yourself for starters.

    Regards,
    Sven

  3. #3
    Join Date
    Oct 2007
    Posts
    10

    Default

    My dear Uncle Sboden

    Yes I know, i manage to get the car broken... Now I need some hands to fix it this before my uncle get home... some punishments are showing...


    What am doing is using TextFileInput to read a flat file... I pulled in some fields with the TextFileInputField component... used a select value to change field names and then output data to a table using table output...

    Even reading from the file is not working... is there any useful examples out there???

    Thank you very much for your answers...

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Hi Bernard,

    The main example is TextFileInputDialog.java method getInfo(). It will explain you how to set the properties.
    If you want more specific answers, show us your code.

    Matt

  5. #5
    Join Date
    Oct 2007
    Posts
    10

    Default

    The full error code is:
    -Reading data from [C:\TEMP\DATA\AIS.PR.FUND.AVT7901] - java.lang.NullPointerException
    at org.pentaho.di.core.variables.Variables.environmentSubstitute(Variables.java:149)
    at org.pentaho.di.trans.TransMeta.environmentSubstitute(TransMeta.java:5692)
    at org.pentaho.di.core.fileinput.FileInputList.createFileList(FileInputList.java:89)
    at org.pentaho.di.core.fileinput.FileInputList.createFileList(FileInputList.java:80)
    at org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta.getTextFileList(TextFileInputMeta.java:1207)
    at org.pentaho.di.trans.steps.textfileinput.TextFileInput.init(TextFileInput.java:1333)
    at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:48)
    at java.lang.Thread.run(Unknown Source)

    if somebody can help find out what's going on under the hood... I will appreciate...

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    You didn't supply the TextFileInputMeta object with the file masks.
    It's a String[] the same size as the file name String array.
    You can make the content all nulls, but the array itself needs to be there.

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.