在命令行中运行pan.bat时出错

时间:2016-03-04 04:27:39

标签: command-line cmd pentaho kettle pdi

with the reference to my previous post,here is the link

我还面临着一些错误。我尝试运行其他.ktr文件它运行成功,但当我尝试运行“pivot_inject_etl_metadata.ktr”时,它给了我以下错误

 C:\pdi-ce-5.2.0.0-209\data-integration>pan.bat /file:E:\Practise_TRANSFORMATION_OUTPUT\dynamic_pivot\pivot_inject_etl_metadata.ktr /level:Basic 
DEBUG: Using PENTAHO_JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jre1.8.0_51
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jre1.8.0_51\bin\java.exe

C:\pdi-ce-5.2.0.0-209\data-integration>"C:\Program Files\Java\jre1.8.0_51\bin\java.exe"  "-Xmx256m" "-XX:MaxPermSize=256m" "-Djava.library.path=libswt\win64" "-DKETTLE_HOME=" "-DKETTLE_REPOSITORY=" "-
DKETTLE_USER=" "-DKETTLE_PASSWORD=" "-DKETTLE_PLUGIN_PACKAGES=" "-DKETTLE_LOG_SIZE_LIMIT=" "-DKETTLE_JNDI_ROOT=" -jar launcher\pentaho-application-launcher-5.2.0.0-209.jar -lib ..\libswt\win64  -main
org.pentaho.di.pan.Pan /file:E:\Practise_TRANSFORMATION_OUTPUT\dynamic_pivot\pivot_inject_etl_metadata.ktr /level:Basic
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
2016/03/04 09:46:41 - Pan - Logging is at level : Basic logging
2016/03/04 09:46:41 - Pan - Start of run.
2016/03/04 09:46:41 - pivot_inject_etl_metadata - Dispatching started for transformation [pivot_inject_etl_metadata]
2016/03/04 09:46:41 - ETL Metadata Injection.0 - ERROR (version 5.2.0.0, build 1 from 2014-09-30_19-48-28 by buildguy) : Bad encoding!
2016/03/04 09:46:41 - ETL Metadata Injection.0 - ERROR (version 5.2.0.0, build 1 from 2014-09-30_19-48-28 by buildguy) : org.pentaho.di.core.exception.KettleException:
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Unable to load transformation ///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr from file.
2016/03/04 09:46:41 - ETL Metadata Injection.0 -
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Unable to read file [file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr]
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Could not read from "file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr" because it is a not a file.
2016/03/04 09:46:41 - ETL Metadata Injection.0 -
2016/03/04 09:46:41 - ETL Metadata Injection.0 -
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.trans.steps.metainject.MetaInjectMeta.loadTransformationMeta(MetaInjectMeta.java:443)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.trans.steps.metainject.MetaInject.init(MetaInject.java:403)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at java.lang.Thread.run(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Caused by: org.pentaho.di.core.exception.KettleXMLException:
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Unable to read file [file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr]
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Could not read from "file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr" because it is a not a file.
2016/03/04 09:46:41 - ETL Metadata Injection.0 -
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:559)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:538)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2660)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.trans.steps.metainject.MetaInjectMeta.loadTransformationMeta(MetaInjectMeta.java:438)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        ... 3 more
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Caused by: org.apache.commons.vfs.FileNotFoundException: Could not read from "file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr"
 because it is a not a file.
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.core.vfs.KettleVFS.getInputStream(KettleVFS.java:247)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:557)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        ... 6 more
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Caused by: java.io.FileNotFoundException: E:\Practise_TRANSFORMATION OUTPUT\dynamic pivot\pivot_inject.ktr (The system cannot find the file specified)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at java.io.FileInputStream.open0(Native Method)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at java.io.FileInputStream.open(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at java.io.FileInputStream.<init>(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        at org.apache.commons.vfs.provider.local.LocalFile.doGetInputStream(Unknown Source)
2016/03/04 09:46:41 - ETL Metadata Injection.0 -        ... 10 more
2016/03/04 09:46:41 - ETL Metadata Injection.0 - ERROR (version 5.2.0.0, build 1 from 2014-09-30_19-48-28 by buildguy) : Error initializing step [ETL Metadata Injection]
2016/03/04 09:46:41 - pivot_inject_etl_metadata - ERROR (version 5.2.0.0, build 1 from 2014-09-30_19-48-28 by buildguy) : Step [ETL Metadata Injection.0] failed to initialize!
Unable to prepare and initialize this transformation

我能为此解决这个问题吗?提前谢谢。

4 个答案:

答案 0 :(得分:1)

以下是我收到的错误消息。

无法读取“file:/// E:/ Practise_TRANSFORMATION OUTPUT / dynamic pivot / pivot_inject.ktr“因为它不是文件。

你应该检查: - 是否在E:/ Practise_TRANSFORMATION OUTPUT / dynamic中存在pivot_inject.ktr文件 枢 - pivot_inject.ktr文件格式是否正确..

你可以通过简单地复制:file:/// E:/ Practise_TRANSFORMATION OUTPUT / dynamic pivot / pivot_inject.ktr并粘贴在窗口浏览器或Web浏览器

答案 1 :(得分:1)

此处:Running pan.bat from command line在您撰写的评论之一中:

&#34;谢谢,我尝试通过将其设置为Practise_TRANSFORMATION_OUTPUT从我的文件夹中删除空格。但遗憾的是还有另一个错误。&#34;

然后你得到错误:

2016/03/04 09:46:41 - ETL Metadata Injection.0 -
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Unable to read file [file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr]
2016/03/04 09:46:41 - ETL Metadata Injection.0 - Could not read from "file:///E:/Practise_TRANSFORMATION OUTPUT/dynamic pivot/pivot_inject.ktr" because it is a not a file.

再一次 -

Practise_TRANSFORMATION OUTPUT

对转换参考进行硬编码的文件夹不正确。我想应该是

Practise_TRANSFORMATION_OUTPUT

重命名某个文件夹后请检查 - 所有其他手动硬编码路径也会更新。使用存储库。 如果您仍然没有使用存储库 - 但想要从同一文件夹下的其他引用引用一个转换 - 请使用名为:

的变量
${Internal.Transformation.Filename.Directory}

用于转换和

${Internal.Job.Filename.Directory}

相应的工作。希望这会有所帮助。

答案 2 :(得分:0)

您日志中的第一条错误消息是“ERROR(版本5.2.0.0,构建1来自2014-09-30_19-48-28 by buildguy):编码错误!”

我很想知道文件“pan.bat”的编码。

答案 3 :(得分:0)

嗨嗨嗨所有感谢您的帮助,我想我已经找出了该错误背后的原因,我相信这是我在“CSV输入”步骤中没有更改源文件路径的最愚蠢的原因并且没有正确指定了“pivot_inject.ktr”路径。 再次感谢。  enter image description here