You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Java集成Kettle执行转换时遇Unable to find ID 'Kettle'异常求助

解决Java集成Kettle时"Unable to find plugin with ID 'Kettle'"异常

异常原因

该异常是Kettle加密组件初始化时,无法找到默认的"Kettle"密码编码器插件导致的。Kettle需要这个插件处理密码加密逻辑,要么通过依赖引入,要么通过classpath中的配置文件指定。

简便解决方案

方案一:添加Maven依赖(推荐)

在你的pom.xml中添加与Kettle版本一致的密码编码器插件依赖,Maven会自动引入所需的配置文件:

<dependency>
    <groupId>pentaho-kettle</groupId>
    <artifactId>kettle-password-encoder-plugin</artifactId>
    <version>9.1.0.0-324</version>
</dependency>

添加后刷新Maven依赖,重新运行项目即可。

方案二:手动添加配置文件

若不想新增依赖,可在项目的src/main/resources目录下创建kettle-password-encoder-plugins.xml文件,内容如下:

<password-encoder-plugins>
  <password-encoder-plugin id="Kettle"
    class="org.pentaho.di.core.encryption.KettleTwoWayPasswordEncoder"
    description="Kettle Password Encoder"/>
</password-encoder-plugins>

该配置文件直接指定了Kettle默认的密码编码器实现,让初始化流程能找到对应的插件。

验证

修改完成后重新运行EjecutarTransformaciones类,KettleEnvironment应该能正常初始化,转换也可以正常执行。

内容的提问来源于stack exchange,提问作者Marcelo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 22:05:19