Pentaho Server 8.2 无法解析转换中的文件路径
Pentaho Server 8.2 fails to resolve file path in transformation
我正在使用 PDI 8.2 CE 和 Penatho BI Server 8.2CE。转换在本地工作正常,其中 .ktrs 和文件保存在本地文件夹中,使用 ${Internal.Entry.Current.Directory} 映射在 ktr 中使用的文本文件。然而,一旦将其上传到 Penatho BI 服务器(将文本文件保存在与 ktr 相同的文件夹中)并尝试 运行 它 ${Internal.Entry.Current.Directory} 被解析为 "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt"相对存储库目录!
我不知道有什么改变可以让它重新工作?如果有人遇到同样的问题,请帮助...
谢谢堆..
下面的一些日志,
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
Pentaho 存储库不打算存储 Pentaho 报告和 Pentaho transformations/jobs 以外的任何文件类型。 ${Internal.Entry.Current.Directory} 变量只能在 Windows/Mac/Linux 文件系统中引用文本文件之类的东西。在 Pentaho 服务器内部,该变量用于引用其他转换或作业,它不能引用文本文件之类的东西。您应该创建 Pentaho 服务器 JVM 可以访问的文本文件的直接路径。
我正在使用 PDI 8.2 CE 和 Penatho BI Server 8.2CE。转换在本地工作正常,其中 .ktrs 和文件保存在本地文件夹中,使用 ${Internal.Entry.Current.Directory} 映射在 ktr 中使用的文本文件。然而,一旦将其上传到 Penatho BI 服务器(将文本文件保存在与 ktr 相同的文件夹中)并尝试 运行 它 ${Internal.Entry.Current.Directory} 被解析为 "file:///C:/public/ErrorHandlingSample/UnitTestData_MultiType.txt"相对存储库目录!
我不知道有什么改变可以让它重新工作?如果有人遇到同样的问题,请帮助...
谢谢堆..
下面的一些日志,
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
Pentaho 存储库不打算存储 Pentaho 报告和 Pentaho transformations/jobs 以外的任何文件类型。 ${Internal.Entry.Current.Directory} 变量只能在 Windows/Mac/Linux 文件系统中引用文本文件之类的东西。在 Pentaho 服务器内部,该变量用于引用其他转换或作业,它不能引用文本文件之类的东西。您应该创建 Pentaho 服务器 JVM 可以访问的文本文件的直接路径。