pentaho/pentaho-kettle · error · KettleException
Unable to find plugin with ID '" + encoderPluginId + "'. …
Error message
Unable to find plugin with ID '" + encoderPluginId + "'. If this is a test, make sure kettle-core tests jar is a dependency. If this is live make sure a kettle-password-encoder-plugins.xml exits in the classpath
What it means
Encr.init(encoderPluginId) throws KettleException when the PluginRegistry cannot find a TwoWayPasswordEncoderPluginType plugin with the given id, with a message explaining that kettle-core tests jar or a kettle-password-encoder-plugins.xml on the classpath provides the plugins. The registry loaded fine but no plugin matches encoderPluginId.
Solutions
- Use the standard id "kettle" unless a custom encoder is intended.
- Ensure kettle-password-encoder-plugins.xml exists on the classpath (it ships in kettle-core) and lists the requested id.
- For tests, add the kettle-core tests jar dependency or call KettleEnvironment.init(true).
- Verify with PluginRegistry.getInstance().findPluginWithId(TwoWayPasswordEncoderPluginType.class, id) != null before init.
Example fix
// before (pom.xml) — tests jar missing <dependency><groupId>org.pentaho.di</groupId><artifactId>kettle-core</artifactId><version>...</version></dependency> // after <dependency><groupId>org.pentaho.di</groupId><artifactId>kettle-core</artifactId><version>...</version><classifier>tests</classifier><scope>test</scope></dependency>
Defensive patterns
Strategy: validation
Validate before calling
PluginInterface p = PluginRegistry.getInstance() .findPluginWithId( TwoWayPasswordEncoderPluginType.class, "kettle" ); if ( p == null ) throw new IllegalStateException( "Password encoder plugin not on classpath" ); Encr.init( "kettle" );
Try / catch
try {
Encr.init( encoderPluginId );
} catch ( KettleException e ) {
if ( e.getMessage().contains( "Unable to find plugin with ID" ) ) {
throw new IllegalStateException( "Encoder plugin missing; add kettle-password-encoder-plugins.xml / tests jar to classpath", e );
}
throw e;
} Prevention
- Prefer KettleEnvironment.init() over manual Encr.init
- Keep kettle-password-encoder-plugins.xml on the classpath
- Add the kettle-core tests classifier for unit tests that need plugins
- Use the standard 'kettle' plugin id unless a custom encoder is required
When it happens
Trigger: Calling Encr.init("some-id") where some-id is not registered: typo'd plugin id, missing kettle-password-encoder-plugins.xml on the classpath, or running tests without the kettle-core test plugins registered.
Common situations: Unit tests calling Encr without KettleEnvironment.init() and without the tests jar dependency; custom deployments that removed the password encoder plugin XML; renamed plugin ids across Kettle versions.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- JobEntryLoader was unable to find Job Entry Plugin with…
- Unable to initialize the two way password encoder: No…
- WrappedWebsphereMQProvider.ErrorLoadingClass
- Cannot find WSDL file: + _wsdlName
- Could not create ValueMetaInterface
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/be10002cc3da457b.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/encryption/Encr.java:53
private static TwoWayPasswordEncoderInterface encoder;
public Encr() {
}
@Deprecated
public boolean init() {
return true;
}
public static void init( String encoderPluginId ) throws KettleException {
if ( Utils.isEmpty( encoderPluginId ) ) {
throw new KettleException( "Unable to initialize the two way password encoder: No encoder plugin type specified." );
}
PluginRegistry registry = PluginRegistry.getInstance();
PluginInterface plugin = registry.findPluginWithId( TwoWayPasswordEncoderPluginType.class, encoderPluginId );
if ( plugin == null ) {
throw new KettleException( "Unable to find plugin with ID '" + encoderPluginId + "'. If this is a test, make sure"
+ " kettle-core tests jar is a dependency. If this is live make sure a kettle-password-encoder-plugins.xml"
+ " exits in the classpath" );
}
encoder = (TwoWayPasswordEncoderInterface) registry.loadClass( plugin );
// Load encoder specific options...
//
try {
encoder.init();
} catch ( PasswordEncoderException e ) {
throw new KettleException( e );
}
}
/**
* Old signature code, used in license keys, from the Kettle 1.x days.
* @param signature
* @param verifyView on GitHub (pinned to f3058517a1)