pentaho/pentaho-kettle · error · KettleXMLException
GoogleAnalytics.Error.UnableToReadFromXML
Error message
GoogleAnalytics.Error.UnableToReadFromXML
What it means
GaInputStepMeta's XML-loading constructor (loadXML path) wraps any exception occurring while parsing the step's Google Analytics settings from the transformation XML into a KettleXMLException with the localized 'GoogleAnalytics.Error.UnableToReadFromXML' message. Thrown because malformed or incompatible XML would leave the step metadata unparsable.
Solutions
- Inspect the nested cause (e.getCause()) — usually a NumberFormatException or NullPointerException on a specific XML attribute.
- Open the .ktr in a text editor and fix or remove the malformed <step> node for the GoogleAnalytics step.
- Re-create the Google Analytics step in the same Pentaho version that will run the transformation.
- Ensure the google-analytics plugin version matches the transformation's authoring version.
Example fix
// before: corrupted numeric attribute in XML causing parse failure // <ga_gaField>...<conversionMask>abc</conversionMask> // after: correct the attribute value // <ga_gaField>...<conversionMask>yyyy-MM-dd</conversionMask>
Defensive patterns
Strategy: try-catch
Try / catch
try {
transMeta = new TransMeta( fileName, metaStore );
} catch ( KettleXMLException e ) {
log.error( "XML load failed: " + e.getMessage(), e.getCause() );
// inspect the failing <step> node in the .ktr
} Prevention
- Never hand-edit .ktr XML for GA steps
- Use the same Pentaho/plugin version to author and run transformations
- Check e.getCause() for the exact attribute that failed to parse
When it happens
Trigger: Loading a .ktr whose <step> node for the Google Analytics input contains malformed or unexpected XML — e.g. invalid date fields, numeric conversion failures while parsing ga fields, or attributes written by a different plugin version.
Common situations: Opening a transformation authored in a newer/older Pentaho version with changed XML fields; hand-edited .ktr files with a corrupted step node; copy-pasting step XML between transformations with mismatched attributes.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
Related errors
- GoogleAnalytics.Error.UnableToReadFromRep
- AbortMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepo…
- AddSequenceMeta.Exception.ErrorLoadingStepInfo
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
- AnalyticQueryMeta.Exception.UnableToLoadStepInfoFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1f088f4667fde502.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/google-analytics/core/src/main/java/org/pentaho/di/trans/steps/googleanalytics/GaInputStepMeta.java:516
allocate( nrFields );
for ( int i = 0; i < nrFields; i++ ) {
Node knode = XMLHandler.getSubNodeByNr( stepnode, "feedField", i );
feedFieldType[ i ] = XMLHandler.getTagValue( knode, "feedFieldType" );
feedField[ i ] = XMLHandler.getTagValue( knode, "feedField" );
outputField[ i ] = XMLHandler.getTagValue( knode, "outField" );
outputType[ i ] = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( knode, "type" ) );
conversionMask[ i ] = XMLHandler.getTagValue( knode, "conversionMask" );
if ( outputType[ i ] < 0 ) {
outputType[ i ] = ValueMetaInterface.TYPE_STRING;
}
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "GoogleAnalytics.Error.UnableToReadFromXML" ), e );
}
}
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
throws KettleException {
try {
String user = rep.getStepAttributeString( id_step, "user" );
String pass = rep.getStepAttributeString( id_step, "pass" );
String apiKey = rep.getStepAttributeString( id_step, "apiKey" );
oauthServiceAccount = rep.getStepAttributeString( id_step, "oauthServiceAccount" );
oauthKeyFile = rep.getStepAttributeString( id_step, "oauthKeyFile" );
// Are we loading a legacy transformation?
if ( ( user != null || pass != null || apiKey != null )
&& ( oauthServiceAccount == null && oauthKeyFile == null ) ) {View on GitHub (pinned to f3058517a1)