pentaho/pentaho-kettle · error · KettleXMLException

WebServiceAvailableMeta.Exception.UnableToReadStepInfo

Error message

WebServiceAvailableMeta.Exception.UnableToReadStepInfo

What it means

WebServiceAvailableMeta.readData (called from loadXML) wraps XML parsing of the step's urlField/connectTimeOut/readTimeOut/resultfieldname tags in a try/catch and rethrows as KettleXMLException 'Unable to read step info from XML'. The step definition in the .ktr could not be parsed.

Solutions

  1. Inspect the WebServiceAvailable step XML block in the .ktr for malformed tags and repair it.
  2. Restore the file from backup/version control.
  3. Recreate the step in Spoon and reconfigure urlField, timeouts, and result field.
  4. Check the wrapped cause in the stack trace for the exact parser failure.

Example fix

// before (truncated)
<urlField>url</urlField
// after
<urlField>url</urlField><connectTimeOut>30000</connectTimeOut>
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate the .ktr parses before loading into metadata:
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath));

Try / catch

try {
  transMeta.loadXML(new FileInputStream(ktr), null, this);
} catch (KettleXMLException e) {
  logError("Unreadable step info in XML", e);
  // restore from backup
}

Prevention

When it happens

Trigger: loadXML -> readData(stepnode); XMLHandler.getTagValue throws while reading the WebServiceAvailable step node (malformed/truncated XML, wrong node structure).

Common situations: Hand-edited or corrupted .ktr; upgrade schema mismatch; truncated download/transfer of the transformation file.

Understand the failure class

Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/256f35f052d56b6d. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webserviceavailable/WebServiceAvailableMeta.java:158

  public String getXML() {
    StringBuilder retval = new StringBuilder();

    retval.append( "    " + XMLHandler.addTagValue( "urlField", urlField ) );
    retval.append( "    " + XMLHandler.addTagValue( "readTimeOut", readTimeOut ) );
    retval.append( "    " + XMLHandler.addTagValue( "connectTimeOut", connectTimeOut ) );
    retval.append( "    " + XMLHandler.addTagValue( "resultfieldname", resultfieldname ) );
    return retval.toString();
  }

  private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {
    try {
      urlField = XMLHandler.getTagValue( stepnode, "urlField" );
      connectTimeOut = XMLHandler.getTagValue( stepnode, "connectTimeOut" );
      readTimeOut = XMLHandler.getTagValue( stepnode, "readTimeOut" );
      resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" );
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "WebServiceAvailableMeta.Exception.UnableToReadStepInfo" ), e );
    }
  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      urlField = rep.getStepAttributeString( id_step, "urlField" );
      connectTimeOut = rep.getStepAttributeString( id_step, "connectTimeOut" );
      readTimeOut = rep.getStepAttributeString( id_step, "readTimeOut" );
      resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "WebServiceAvailableMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {

View on GitHub (pinned to f3058517a1)