fxliagre Posted April 11, 2008 Share Posted April 11, 2008 I'm currently building a job parsing and loading an XML file in several DB tables. I have one tFileInputXML "main", and 3 others "lookup", each of them defining and processing the same file. Then I try to add, as an entry, a tFileListComponent looking and iterating on xml files in a directory (for the test, only one file in the directory). I replaced in my 4 tFileInputXML the absolute file name by the variable ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) The first (main) tFileInputXML works perfectly, but the 3 others fails saying "null pointer exception" The generated source shows the error line as :org.dom4j.Document doc_tFileInputXML_3 = reader_tFileInputXML_3 .read(new java.io.FileInputStream(((String) globalMap .get("tFileList_1_CURRENT_FILEPATH")))); Any idea to help ? Link to comment Share on other sites More sharing options...
fxliagre Posted April 11, 2008 Author Share Posted April 11, 2008 Additional info : I forgot to mention : TOS Version: 2.3.2Build id: r12707-20080331-1117 And the reason of the error seems to be a improper code generation (lookup links are called BEFORE the tFileList component is executed !) : tFileInputXML_3Process(); tFileInputXML_4Process(); tFileInputXML_5Process();use the global map, which one is filled by the tFileList execution which occurs... only later ! Code: public void tFileList_1Process() throws TalendException { try { tFileInputXML_3Process(); tFileInputXML_4Process(); tFileInputXML_5Process(); row1Struct row1 = new row1Struct(); row1Struct row3 = row1; row2Struct row2 = new row2Struct(); setsStruct sets = new setsStruct(); logStruct log = new logStruct(); logSetsStruct logSets = new logSetsStruct(); /** * [tFileList_1 begin ] start */ ok_Hash.put("tFileList_1", false); start_Hash.put("tFileList_1", System.currentTimeMillis()); currentComponent = "tFileList_1"; // tFileList_Begin String directory_tFileList_1 = "C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/promotion/export"; String filemask_tFileList_1 = "*.xml" + "$";// etc... But everything I tried always produce this generation...Post edited by: fxliagre, at: 2008/04/11 15:44 Link to comment Share on other sites More sharing options...
mdahlman Posted April 14, 2008 Share Posted April 14, 2008 For anyone experiencing the same problem, please note that this issue has been cross-posted to the talend forums here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now