pentaho/pentaho-kettle · error · org.pentaho.di.core.exception.KettleValueException
KettleValueException wrapping KettlePluginException from…
Error message
KettleValueException wrapping KettlePluginException from cloneToType (no message; cause carries detail)
What it means
cloneToType creates a new RowMeta of a target type (e.g. to clone metadata between binary/string representations). The RowMeta copy constructor may throw KettlePluginException when ValueMetaFactory cannot create a value meta of the requested type. RowMeta translates that into a KettleValueException because cloneToType's signature only declares KettleValueException; the root cause and its message are carried on the exception's cause.
Solutions
- Inspect getCause() of the KettleValueException to find the underlying KettlePluginException detail message.
- Verify all Kettle value-type plugin jars are present on the classpath / in the plugins directory.
- Ensure the PDI core and plugin versions match the target value type; upgrade/downgrade to a consistent set of jars.
- If wrapping a custom ValueMeta, confirm its class is public, has a no-arg/copy constructor, and is registered with ValueMetaFactory.
Example fix
// before
RowMetaInterface stringClone = rowMeta.cloneToType(ValueMetaInterface.TYPE_STRING);
// after
try {
RowMetaInterface stringClone = rowMeta.cloneToType(ValueMetaInterface.TYPE_STRING);
} catch (KettleValueException e) {
log.error("cloneToType failed: " + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()), e);
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
if (rowMeta == null || rowMeta.size() == 0) { throw new IllegalStateException("Cannot clone empty RowMeta"); } Try / catch
try {
RowMetaInterface clone = rowMeta.cloneToType(ValueMetaInterface.TYPE_STRING);
} catch (KettleValueException e) {
Throwable cause = e.getCause();
log.error("cloneToType failed: " + (cause != null ? cause.getMessage() : e.getMessage()), e);
} Prevention
- Ship all value-type plugin jars with your PDI installation.
- Keep PDI core and plugin versions consistent.
- Log e.getCause() rather than only the wrapper's (empty) message.
When it happens
Trigger: Calling rowMeta.cloneToType(ValueMetaInterface.TYPE_...) where cloning a value meta requires the plugin factory to instantiate a value class that is missing, not registered, or whose constructor fails (e.g. an unknown/removed value type plugin on the classpath).
Common situations: PDI plugin jar missing from plugins/ directory so a custom value type cannot be instantiated; version mismatch where a value type class was renamed/moved between Pentaho/PDI versions; classloader issues when embedding Kettle in an application.
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
- KafkaConsumerInputMeta.UnableToCreateValueType
- Please set a value for the missing field(s) type.
- Problem with clone row detected in RowMetaAndData
- RuntimeException wrapping clone failure (no message; cause…
- <toString()>: unable to make copy of value type: <getType()>
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7f36306054ff3886.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/RowMeta.java:108
} finally {
lock.readLock().unlock();
}
}
/**
* This method copies the row metadata and sets all values to the specified type (usually String)
*
* @param targetType The target type
* @return The cloned metadata
* @throws if the target type could not be loaded from the plugin registry
*/
@Override
public RowMetaInterface cloneToType( int targetType ) throws KettleValueException {
lock.readLock().lock();
try {
return new RowMeta( this, targetType );
} catch ( KettlePluginException e ) {
throw new KettleValueException( e );
} finally {
lock.readLock().unlock();
}
}
@Override
public String toString() {
StringBuilder buffer = new StringBuilder();
lock.readLock().lock();
try {
boolean notFirst = false;
for ( ValueMetaInterface valueMeta : valueMetaList ) {
if ( notFirst ) {
buffer.append( ", " );
} else {
notFirst = true;
}
buffer.append( "[" ).append( valueMeta.toString() ).append( "]" );View on GitHub (pinned to f3058517a1)