I am using PDI 8.2 CE and Penatho BI Server 8.2CE. Transformation works fine locally where the .ktrs and files are saved in local folders, using ${Internal.Entry.Current.Directory} to map a text file that is used in the ktr. However once this is uploaded to the Penatho BI Server (saving the text file in the same folder as the ktr) and try to run it the ${Internal.Entry.Current.Directory} is resolved as "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt" instead of the relative repository directory !!!
I don't know what change can make it working again? If anyone hit the same issue please help...
Thanks heaps..
Some logs below,
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - An error occurred while creating field mapping
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - Could not read from "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt" because it is not a file.
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 -
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - Could not read from "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt" because it is not a file.
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 -
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.readFieldNamesFromFile(CsvInput.java:463)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.createFieldMapping(CsvInput.java:427)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.openNextFile(CsvInput.java:332)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.processRow(CsvInput.java:135)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at java.lang.Thread.run(Thread.java:748)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - Caused by: org.apache.commons.vfs2.FileNotFoundException: Could not read from "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt" because it is not a file.
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1123)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.apache.commons.vfs2.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:349)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.core.vfs.KettleVFS.getInputStream(KettleVFS.java:263)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.readFieldNamesFromFile(CsvInput.java:443)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - ... 5 more
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - Caused by: java.io.FileNotFoundException: C:\public\ErrorHandlingSample\UnitTestData_MultiType.txt (The system cannot find the path specified)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at java.io.FileInputStream.open0(Native Method)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at java.io.FileInputStream.open(FileInputStream.java:195)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at java.io.FileInputStream.<init>(FileInputStream.java:138)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - at org.apache.commons.vfs2.provider.local.LocalFile.doGetInputStream(LocalFile.java:215)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0
at org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1119)
2019/08/13 13:02:29 - Scenario 1 Input Data 2.0 - ... 8 more
The Pentaho repository is not intended to be a store of any file type other than Pentaho reports, and Pentaho transformations/jobs. The ${Internal.Entry.Current.Directory} variable will only work to reference things like text files while in the Windows/Mac/Linux file systems. While inside the Pentaho Server, that variable is used to reference other transformations or jobs, it won't work to reference things like text files. You should create a direct path to the text file that the Pentaho Server JVM can access.