Pentaho kettle 由于缺少插件无法 运行 转换
Pentaho kettle Can't run transformation due to plugin missing
我尝试使用 java 执行转换文件,转换从数据库中获取数据并通过 s3 输出文件 step.it 将数据打印到 s3 中的文件,当 运行 通过 spoon 时工作正常,但是在 java 应用程序中尝试 运行 时出现以下错误
Can't run transformation due to plugin missing
java代码
KettleEnvironment.init();
URL ktrUrl = PipelineResource.class.getClassLoader().getResource(tempFile.getAbsolutePath());
TransMeta transMeta = new TransMeta(ktrUrl.getPath());
Trans trans = new Trans(transMeta);
trans.execute(new String[]{});
trans.waitUntilFinished();
if (trans.getErrors() > 0) {
完整的堆栈跟踪
2017/06/29 12:46:11 - S3 File Output.0 - ERROR (version 7.0.0.6-95, build
1 from 2017-05-23 03.01.13 by buildguy) : Can't run transformation due to
plugin missing2017/06/29 12:46:11 - S3 File Output.0 - ERROR (version
7.0.0.6-95, build 1 from 2017-05-23 03.01.13 by buildguy) : Error
initializing step [S3 File Output]
2017/06/29 12:46:11 - transformation1 - ERROR (version 7.0.0.6-95, build 1
from 2017-05-23 03.01.13 by buildguy) : Step [S3 File Output.0] failed to
initialize!
2017/06/29 12:46:11 - data from asset.0 - Finished reading query, closing
connection.
2017-06-29 12:46:11.048 ERROR 22396 --- [ XNIO-2 task-2]
com.innvo.aop.logging.LoggingAspect : Exception in
com.innvo.web.rest.PipelineResource.runPipeline() with cause = 'NULL' and
exception = '
We failed to initialize at least one step. Execution can not begin!'
org.pentaho.di.core.exception.KettleException:
We failed to initialize at least one step. Execution can not begin!
at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:1157)
at org.pentaho.di.trans.Trans.execute(Trans.java:627)
at com.innvo.web.rest.PipelineResource.runPipeline(PipelineResource.java:201)
at com.innvo.web.rest.PipelineResource$$FastClassBySpringCGLIB$033db7.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at com.innvo.aop.logging.LoggingAspect.logAround(LoggingAspect.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
通过在
之前添加插件路径来工作
KettleEnvironment.init();
添加插件路径
StepPluginType.getInstance().getPluginFolders().add(new PluginFolder("/home/ali/data-integration/plugins", false, true));
它只有在我执行以下操作时才起作用:
1) 添加了以下将 data-integration 插件文件夹指向 VM 参数的变量:
-DKETTLE_PLUGIN_BASE_FOLDERS=path_to_your_data-integration/plugin
2) 这还不够,因为我的插件文件夹缺少 mongodb jar,当我添加 jar pentaho-mongo-utils-8.2.0.0-342.jar(注意 jar 可能会根据您的目标版本而有所不同)它有效。
我尝试使用 java 执行转换文件,转换从数据库中获取数据并通过 s3 输出文件 step.it 将数据打印到 s3 中的文件,当 运行 通过 spoon 时工作正常,但是在 java 应用程序中尝试 运行 时出现以下错误
Can't run transformation due to plugin missing
java代码
KettleEnvironment.init();
URL ktrUrl = PipelineResource.class.getClassLoader().getResource(tempFile.getAbsolutePath());
TransMeta transMeta = new TransMeta(ktrUrl.getPath());
Trans trans = new Trans(transMeta);
trans.execute(new String[]{});
trans.waitUntilFinished();
if (trans.getErrors() > 0) {
完整的堆栈跟踪
2017/06/29 12:46:11 - S3 File Output.0 - ERROR (version 7.0.0.6-95, build
1 from 2017-05-23 03.01.13 by buildguy) : Can't run transformation due to
plugin missing2017/06/29 12:46:11 - S3 File Output.0 - ERROR (version
7.0.0.6-95, build 1 from 2017-05-23 03.01.13 by buildguy) : Error
initializing step [S3 File Output]
2017/06/29 12:46:11 - transformation1 - ERROR (version 7.0.0.6-95, build 1
from 2017-05-23 03.01.13 by buildguy) : Step [S3 File Output.0] failed to
initialize!
2017/06/29 12:46:11 - data from asset.0 - Finished reading query, closing
connection.
2017-06-29 12:46:11.048 ERROR 22396 --- [ XNIO-2 task-2]
com.innvo.aop.logging.LoggingAspect : Exception in
com.innvo.web.rest.PipelineResource.runPipeline() with cause = 'NULL' and
exception = '
We failed to initialize at least one step. Execution can not begin!'
org.pentaho.di.core.exception.KettleException:
We failed to initialize at least one step. Execution can not begin!
at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:1157)
at org.pentaho.di.trans.Trans.execute(Trans.java:627)
at com.innvo.web.rest.PipelineResource.runPipeline(PipelineResource.java:201)
at com.innvo.web.rest.PipelineResource$$FastClassBySpringCGLIB$033db7.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at com.innvo.aop.logging.LoggingAspect.logAround(LoggingAspect.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
通过在
之前添加插件路径来工作 KettleEnvironment.init();
添加插件路径
StepPluginType.getInstance().getPluginFolders().add(new PluginFolder("/home/ali/data-integration/plugins", false, true));
它只有在我执行以下操作时才起作用:
1) 添加了以下将 data-integration 插件文件夹指向 VM 参数的变量:
-DKETTLE_PLUGIN_BASE_FOLDERS=path_to_your_data-integration/plugin
2) 这还不够,因为我的插件文件夹缺少 mongodb jar,当我添加 jar pentaho-mongo-utils-8.2.0.0-342.jar(注意 jar 可能会根据您的目标版本而有所不同)它有效。