pentaho/pentaho-kettle · error · KettleXMLException
PGPEncryptStreamMeta.Exception.UnableToReadStepInfo
Error message
PGPEncryptStreamMeta.Exception.UnableToReadStepInfo
What it means
KettleXMLException thrown by PGPEncryptStreamMeta.readData when parsing the step's XML node fails. The method reads attributes (keyname, keynameInField, keynameFieldName, streamfield, resultfieldname) via XMLHandler; any exception while reading these tags is wrapped with this message. It indicates the transformation XML is malformed or missing expected elements for the PGP Encrypt Stream step.
Solutions
- Open the .ktr in a text editor and validate the XML well-formedness and the <step> node for the PGP Encrypt Stream step.
- Re-create the step in Spoon and re-save the transformation to regenerate correct XML.
- Check that the file was exported from a compatible Pentaho Data Integration version; re-export if not.
Example fix
// before: hand-edited XML with missing/corrupt step node <step><name>PGP</name><type>PGPEncryptStream</type> // after: re-save from Spoon so loadXML sees a complete node <step><name>PGP</name><type>PGPEncryptStream</type><keyname/><keynameInField>N</keynameInField><streamfield/><resultfieldname/>...</step>
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate XML before loadXML
Document doc = XMLHandler.loadXMLFile(new File(ktrPath)); // throws on malformed
Node step = XMLHandler.getSubNode(XMLHandler.getSubNode(doc, "transformation"), "step");
if (step == null || XMLHandler.getTagValue(step, "type") == null) throw new IllegalStateException("invalid step XML"); Try / catch
try { meta.loadXML(stepNode, databases, metaStore); } catch (KettleXMLException e) { log.error("Corrupt PGP step XML: " + e.getCause(), e); throw e; } Prevention
- Never hand-edit .ktr files; always edit in Spoon
- Keep exporting/importing within the same PDI version
- Keep transformation files under version control to detect corruption
When it happens
Trigger: loadXML calls readData with a step node whose XML is corrupt, hand-edited, produced by an incompatible Pentaho version, or missing tags that XMLHandler.getTagValue cannot process; XMLHandler itself throws a parse exception.
Common situations: Opening a ktr file edited manually or by another tool; importing transformations exported from a different PDI version; XML file truncated or with encoding issues.
Related errors
- Unable to load step info from XML
- DBProcMeta.Exception.UnableToReadStepInfo
- MergeJoinMeta.Exception.UnableToLoadStepInfo
- MergeRowsMeta.Exception.UnableToLoadStepInfo
- SampleRowsMeta.Exception.UnableToReadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/e0259102f2eb2861.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/pgpencryptstream/PGPEncryptStreamMeta.java:230
retval.append( " " + XMLHandler.addTagValue( "keyname", keyname ) );
retval.append( " " + XMLHandler.addTagValue( "keynameInField", keynameInField ) );
retval.append( " " + XMLHandler.addTagValue( "keynameFieldName", keynameFieldName ) );
retval.append( " " + XMLHandler.addTagValue( "streamfield", streamfield ) );
retval.append( " " + XMLHandler.addTagValue( "resultfieldname", resultfieldname ) );
return retval.toString();
}
private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {
try {
gpglocation = XMLHandler.getTagValue( stepnode, "gpglocation" );
keyname = XMLHandler.getTagValue( stepnode, "keyname" );
keynameInField = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "keynameInField" ) );
keynameFieldName = XMLHandler.getTagValue( stepnode, "keynameFieldName" );
streamfield = XMLHandler.getTagValue( stepnode, "streamfield" );
resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "PGPEncryptStreamMeta.Exception.UnableToReadStepInfo" ), e );
}
}
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
gpglocation = rep.getStepAttributeString( id_step, "gpglocation" );
keyname = rep.getStepAttributeString( id_step, "keyname" );
keynameInField = rep.getStepAttributeBoolean( id_step, "keynameInField" );
keynameFieldName = rep.getStepAttributeString( id_step, "keynameFieldName" );
streamfield = rep.getStepAttributeString( id_step, "streamfield" );
resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "PGPEncryptStreamMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
}
}View on GitHub (pinned to f3058517a1)