pentaho/pentaho-kettle · error · KettleException
<toString()> : Unable to de-serialize index storage type…
Error message
<toString()> : Unable to de-serialize index storage type from XML for data type <getType()>
What it means
Thrown by ValueMetaBase when reading value metadata from XML: the <index> element lists values whose data type is not one of the supported indexed types (String, Number, Integer, Date, Boolean, BigNumber, Binary). Kettle only allows these types for an index storage type, so any other type makes de-serialization impossible.
Solutions
- Open the transformation/step XML and fix the <type> element of the indexed value meta to a supported type (2=Number,3=String,4=Date,5=Boolean,6=Integer,7=Bignumber,8=Binary)
- Regenerate the metadata from the GUI instead of hand-editing XML
- Verify both writer and reader use compatible Pentaho/Kettle versions
- Catch KettleException during XML load and log the value meta name (toString()) to locate the offending field
Example fix
// before (in .ktr XML inside <index>) <type>0</type> <!-- TYPE_NONE, unsupported for index --> // after <type>3</type> <!-- TYPE_STRING -->
Defensive patterns
Strategy: validation
Validate before calling
// before XML load
int type = Integer.parseInt(typeElement.getText());
java.util.Set<Integer> allowed = new java.util.HashSet<>(java.util.Arrays.asList(2,3,4,5,6,7,8));
if (!allowed.contains(type)) {
throw new IllegalArgumentException("Index storage type " + type + " not supported");
} Type guard
// Java has no runtime type guards; validate the parsed type value
static boolean isIndexableType(int type) {
switch (type) {
case ValueMetaInterface.TYPE_NUMBER: case ValueMetaInterface.TYPE_STRING:
case ValueMetaInterface.TYPE_DATE: case ValueMetaInterface.TYPE_BOOLEAN:
case ValueMetaInterface.TYPE_INTEGER: case ValueMetaInterface.TYPE_BIGNUMBER:
case ValueMetaInterface.TYPE_BINARY: return true;
default: return false;
}
} Try / catch
try {
rowMeta = new RowMeta(xmlStream);
} catch (KettleException e) {
log.error("Bad indexed value meta in XML: " + e.getMessage(), e);
throw new StepInitializationException(e);
} Prevention
- Never hand-edit the <type> elements of transformation XML
- Keep reader and writer on compatible Kettle/Pentaho versions
- Validate generated XML against the Kettle schema before loading
- Only use index storage types supported by the value meta API
When it happens
Trigger: Calling the XML de-serialization path (e.g. row metadata read via XMLHandler / loadXML) on a ValueMetaBase whose type field is TYPE_NONE, TYPE_SERIALIZABLE, or any type not handled by the index switch; typically produced by hand-edited or corrupted transformation XML where <type> in an indexed value meta is wrong.
Common situations: Editing a .ktr/.ktr XML file manually and setting an invalid type for an indexed field; metadata written by a newer/older Kettle version with a type the reader doesn't recognize; corrupted repository export.
Related errors
- ColumnExistsMeta.Exception.UnableToReadStepInfo
- CreditCardValidatorMeta.Exception.UnableToReadStepInfo
- CubeOutputMeta.Exception.UnableToLoadStepInfo
- DelayMeta.Exception.UnableToReadStepInfo
- DynamicSQLRowMeta.Exception.UnableToLoadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d7662f3b4b216533.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:293
index[i] = Double.parseDouble( valueString );
break;
case TYPE_INTEGER:
index[i] = Long.parseLong( valueString );
break;
case TYPE_DATE:
index[i] = XMLHandler.stringToDate( valueString );
break;
case TYPE_BIGNUMBER:
index[i] = new BigDecimal( valueString );
break;
case TYPE_BOOLEAN:
index[i] = Boolean.valueOf( "Y".equalsIgnoreCase( valueString ) );
break;
case TYPE_BINARY:
index[i] = XMLHandler.stringToBinary( valueString );
break;
default:
throw new KettleException( toString()
+ " : Unable to de-serialize index storage type from XML for data type " + getType() );
}
}
}
break;
case STORAGE_TYPE_BINARY_STRING:
// Load the storage meta data...
//
Node storageMetaNode = XMLHandler.getSubNode( node, "storage-meta" );
Node storageValueMetaNode = XMLHandler.getSubNode( storageMetaNode, XML_META_TAG );
if ( storageValueMetaNode != null ) {
storageMetadata = new ValueMetaBase( storageValueMetaNode );
}
break;
default:
break;View on GitHub (pinned to f3058517a1)