場景:通過kettle工具制作 表->檔案 導出的轉換作業,由SpringBoot程式調用該産生的ktr檔案
- 錯誤:無法生成導出的檔案
Could not find file with URI "..." because it is a relative path, and no base URI was provided.
___ ___ ______ _ _ ______ _
| \/ | | ___ \ | | (_) | ___ \| |
| . . | _ _ | |_/ / __ _ | |_ _ ___ | |_/ /| | _ _ ___
| |\/| || | | || ___ \ / _` || __|| |/ __| | __/ | || | | |/ __|
| | | || |_| || |_/ /| (_| || |_ | |\__ \ | | | || |_| |\__ \
\_| |_/ \__, |\____/ \__,_| \__||_||___/ \_| |_| \__,_||___/
__/ |
|___/ 3.0-RELEASE
2020-05-06 14:25:36.768 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
Wed May 06 14:25:36 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2020-05-06 14:25:38.555 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor'
2020-05-06 14:25:40.435 [main] INFO o.s.b.actuate.endpoint.web.EndpointLinksResolver - Exposing 2 endpoint(s) beneath base path '/actuator'
2020-05-06 14:25:40.531 [main] INFO com.yqzl.extract.utils.kettle.TestKettleUtil - Started TestKettleUtil in 9.631 seconds (JVM running for 11.209)
2020/05/06 14:25:41 - db2file - 為了轉換解除更新檔開始 [db2file]
2020-05-06 14:25:41.068 [main] INFO org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] 為了轉換解除更新檔開始 [db2file]
Wed May 06 14:25:41 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2020-05-06 14:25:41.135 [Thread-9] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor'
2020-05-06 14:25:41.153 [Thread-9] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
org.pentaho.di.core.exception.KettleFileException:
Unable to get VFS File object for filename 'D:/data/kettle/2020-05-06/abc_20200506.txt' : Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:171)
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:117)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.getFileObject(TextFileOutput.java:1036)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.initFileStreamWriter(TextFileOutput.java:156)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowToFile(TextFileOutput.java:355)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowTo(TextFileOutput.java:468)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.processRow(TextFileOutput.java:461)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:731)
at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:677)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:632)
at org.pentaho.di.core.vfs.KettleVFS.myGetFileObject(KettleVFS.java:177)
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:167)
... 8 more
2020/05/06 14:25:41 - 文本檔案輸出.0 - ERROR (version 9.0.0.0-423, build 9.0.0.0-423 from 2020-01-31 04.53.04 by buildguy) : Unexpected error
2020-05-06 14:25:41.156 [db2file - 文本檔案輸出] ERROR org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] Unexpected error
2020-05-06 14:25:41.157 [db2file - 文本檔案輸出] ERROR org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] org.pentaho.di.core.exception.KettleFileException:
Unable to get VFS File object for filename 'D:/data/kettle/2020-05-06/abc_20200506.txt' : Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:171)
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:117)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.getFileObject(TextFileOutput.java:1036)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.initFileStreamWriter(TextFileOutput.java:156)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowToFile(TextFileOutput.java:355)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowTo(TextFileOutput.java:468)
at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.processRow(TextFileOutput.java:461)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:731)
at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:677)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:632)
at org.pentaho.di.core.vfs.KettleVFS.myGetFileObject(KettleVFS.java:177)
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:167)
... 8 more
2020/05/06 14:25:41 - 文本檔案輸出.0 - ERROR (version 9.0.0.0-423, build 9.0.0.0-423 from 2020-01-31 04.53.04 by buildguy) : org.pentaho.di.core.exception.KettleFileException:
2020/05/06 14:25:41 - 文本檔案輸出.0 -
2020/05/06 14:25:41 - 文本檔案輸出.0 - Unable to get VFS File object for filename 'D:/data/kettle/2020-05-06/abc_20200506.txt' : Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
2020/05/06 14:25:41 - 文本檔案輸出.0 - Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
2020/05/06 14:25:41 - 文本檔案輸出.0 -
2020/05/06 14:25:41 - 文本檔案輸出.0 - Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
2020/05/06 14:25:41 - 文本檔案輸出.0 -
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:171)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:117)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.getFileObject(TextFileOutput.java:1036)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.initFileStreamWriter(TextFileOutput.java:156)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowToFile(TextFileOutput.java:355)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.writeRowTo(TextFileOutput.java:468)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.steps.textfileoutput.TextFileOutput.processRow(TextFileOutput.java:461)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at java.lang.Thread.run(Thread.java:748)
2020/05/06 14:25:41 - 文本檔案輸出.0 - Caused by: org.apache.commons.vfs2.FileSystemException: Could not find file with URI "D:\data\kettle\2020-05-06\abc_20200506.txt" because it is a relative path, and no base URI was provided.
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:731)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:677)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:632)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.core.vfs.KettleVFS.myGetFileObject(KettleVFS.java:177)
2020/05/06 14:25:41 - 文本檔案輸出.0 - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:167)
2020/05/06 14:25:41 - 文本檔案輸出.0 - ... 8 more
2020/05/06 14:25:41 - 文本檔案輸出.0 - 完成處理 (I=0, O=0, R=1, W=0, U=0, E=1)
2020-05-06 14:25:41.169 [db2file - 文本檔案輸出] INFO org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] 完成處理 (I=0, O=0, R=1, W=0, U=0, E=1)
2020/05/06 14:25:41 - 表輸入.0 - Finished reading query, closing connection.
2020-05-06 14:25:41.171 [db2file - 表輸入] INFO org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] Finished reading query, closing connection.
2020/05/06 14:25:41 - db2file - 轉換被檢測
2020-05-06 14:25:41.174 [db2file - 文本檔案輸出] WARN org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] 轉換被檢測
2020/05/06 14:25:41 - db2file - 轉換正在殺死其他步驟!
2020-05-06 14:25:41.175 [db2file - 文本檔案輸出] WARN org.pentaho.di.trans.Trans - [src/main/resources/kjb/db2file1.ktr] 轉換正在殺死其他步驟!
Disconnected from the target VM, address: '127.0.0.1:54021', transport: 'socket'
Process finished with exit code 0
原因:

勾選了這個導緻
解決:将其轉為不勾選狀态
展現在ktr檔案中為:
修改為 N 即可!