Java调用Kettle时,报Can't run transformation due to plugin missing错误
java调用kettle的转换文件,转换使用了MQTT customer进行监听数据,在spoon客户端运行正常,但是在代码里调用就报错Can't run transformation due to plugin missing
下面是完整的报错日志
2022/01/20 16:35:56 - institution_business_mqtt_consumer7311642667756461 - 为了转换解除补丁开始 [institution_business_mqtt_consumer]2022/01/20 16:35:56 - MQTT consumer.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : Can't run transformation due to plugin missing
2022/01/20 16:35:56 - MQTT consumer.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 错误初始化步骤[MQTT consumer]
2022/01/20 16:35:56 - institution_business_mqtt_consumer7311642667756461 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 步骤 [MQTT consumer.0] 初始化失败!
org.pentaho.di.core.exception.KettleException:
无法初始化至少一个步骤. 执行无法开始!
at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:1277)
at org.pentaho.di.trans.Trans.execute(Trans.java:743)
at com.jd.app.jdt.kettle.kettle.execute.TransExecute.executeTrans(TransExecute.java:77)
at com.jd.app.jdt.kettle.kettle.execute.TransExecute.run(TransExecute.java:109)
at com.jd.app.jdt.kettle.quartz.job.TransQuartz.execute(TransQuartz.java:100)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2022/01/20 16:35:56 - institution_business_mqtt_consumer7311642667756461 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 错误被检测到!
2022-01-20 16:35:56.489 ERROR 31068 --- [.0 (Thread-357)] org.pentaho.di.trans.Trans : [] Can't run transformation due to plugin missing
2022-01-20 16:35:56.489 ERROR 31068 --- [.0 (Thread-357)] org.pentaho.di.trans.Trans : [] 错误初始化步骤[MQTT consumer]
2022-01-20 16:35:56.495 ERROR 31068 --- [eduler_Worker-1] c.j.a.jdt.kettle.quartz.job.TransQuartz : 执行转换失败
org.pentaho.di.core.exception.KettleException:
2022/01/20 16:35:56 - institution_business_mqtt_consumer7311642667756461 - 为了转换解除补丁开始 [institution_business_mqtt_consumer]
2022/01/20 16:35:56 - MQTT consumer.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : Can't run transformation due to plugin missing
2022/01/20 16:35:56 - MQTT consumer.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 错误初始化步骤[MQTT consumer]
2022/01/20 16:35:56 - institution_business_mqtt_consumer7311642667756461 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 步骤 [MQTT consumer.0] 初始化失败!
at com.jd.app.jdt.kettle.kettle.execute.TransExecute.executeTrans(TransExecute.java:91) ~[classes/:na]
at com.jd.app.jdt.kettle.kettle.execute.TransExecute.run(TransExecute.java:109) ~[classes/:na]
at com.jd.app.jdt.kettle.quartz.job.TransQuartz.execute(TransQuartz.java:100) ~[classes/:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:na]
有找到一些解决方案,但是都没有效果
比如在初始化前指定插件路径
StepPluginType.getInstance().getPluginFolders() .add(new PluginFolder("F:\\tool\\waresoft\\spoon\\data-integration\\plugins",
false, true));
// kettle环境初始化
KettleEnvironment.init();
也加了系统属性
Properties properties = System.getProperties(); if (StringUtil.hasText(com.jd.app.jdt.kettle.code.constants.KettleConfig.kettleHome)) {
log.info("KETTLE HOME:" + com.jd.app.jdt.kettle.code.constants.KettleConfig.kettleHome);
properties.put("KETTLE_HOME", com.jd.app.jdt.kettle.code.constants.KettleConfig.kettleHome);
}
if (StringUtil.hasText(com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginPackages)) {
log.info("KETTLE_PLUGIN_PACKAGES:" + com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginPackages);
properties.put("KETTLE_PLUGIN_PACKAGES", com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginPackages);
// properties.put("KETTLE_PLUGIN_PACKAGES", FileUtil.replaceSeparator(KettleConfig.kettlePluginPackages));
}
if (StringUtil.hasText(com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginBaseFolder)) {
log.info("KETTLE_PLUGIN_BASE_FOLDERS:" + com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginBaseFolder);
properties.put("KETTLE_PLUGIN_BASE_FOLDERS", com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginBaseFolder);
// properties.put("KETTLE_PLUGIN_BASE_FOLDERS", FileUtil.replaceSeparator(com.jd.app.jdt.kettle.code.constants.KettleConfig.kettlePluginBaseFolder));
//System.setProperty("KETTLE_PLUGIN_BASE_FOLDERS", KettleConfig.kettlePluginBaseFolder);
}
有没有使用kettle实战过的大佬路过指点一下!!!在线等!急!
以上是 Java调用Kettle时,报Can't run transformation due to plugin missing错误 的全部内容, 来源链接: utcz.com/p/944180.html