// 初始化 KETTLE_JSON_PLUGIN 插件在kettle目录下/plugins的路径 StepPluginType.getInstance().getPluginFolders().add(new PluginFolder(KETTLE_JSON_PLUGIN, false, true)); KettleEnvironment.init();
---报错
2022/07/08 16:12:14 - General - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Error while finding annotations for jar plugin: 'file:///D:/Program/pdi-ce-9.3.0.0-428/data-integration/plugins/kettle-json-plugin/kettle-json-plugin-core-9.3.0.0-428.jar'
2022/07/08 16:12:14 - General - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Error while finding annotations for jar plugin: 'file:///D:/Program/pdi-ce-9.3.0.0-428/data-integration/plugins/kettle-json-plugin/kettle-json-plugin-core-9.3.0.0-428.jar'
2022/07/08 16:12:26 - test - 为了转换解除补丁开始 [test]
16:12:26.205 [main] INFO o.p.di.trans.Trans - [logToLogger,98] - [D:/Files/kettle/ktr/test.ktr] 为了转换解除补丁开始 [test]
2022/07/08 16:12:26 - JSON input 选字段.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Can't run transformation due to plugin missing
2022/07/08 16:12:26 - JSON input 1.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Can't run transformation due to plugin missing
2022/07/08 16:12:26 - JSON input选表.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Can't run transformation due to plugin missing
2022/07/08 16:12:26 - JSON input 选字段.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : 错误初始化步骤[JSON input 选字段]
2022/07/08 16:12:26 - JSON input 1.0 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : 错误初始化步骤[JSON input 1]
...
16:12:27.208 [main] ERROR o.p.di.trans.Trans - [logToLogger,91] - [D:/Files/kettle/ktr/test.ktr] 步骤 [JSON input 1.0] 初始化失败!
Exception in thread "main" org.pentaho.di.core.exception.KettleException:
无法初始化至少一个步骤. 执行无法开始!
at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:1295)
at org.pentaho.di.trans.Trans.execute(Trans.java:757)
at com.zhuxin.zxdsp.etl.util.KettleUtil.callNativeTransWithParams(KettleUtil.java:57)
at com.zhuxin.zxdsp.etl.util.KettleUtil.callNativeTrans(KettleUtil.java:34)
at com.zhuxin.zxdsp.etl.util.KettleTaskJob.run(KettleTaskJob.java:14)
at com.zhuxin.zxdsp.etl.util.KettleTaskJob.main(KettleTaskJob.java:32)
--解决
pom文件增加
<dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.20.0-GA</version> </dependency>