pentaho/pentaho-kettle · error · KettleXMLException

JobEntryDelay.UnableToLoadFromXml.Label

Error message

JobEntryDelay.UnableToLoadFromXml.Label

What it means

JobEntryDelay.loadXML throws this localized KettleXMLException when any exception occurs while parsing the job entry's XML node, including reading maximumTimeout/scaletime tags. Integer.parseInt of a missing or non-numeric scaletime value is a common trigger (NumberFormatException is caught here). It means the delay entry could not be deserialized from a .kjb file.

Solutions

  1. Open the .kjb in a text editor and ensure <maximumTimeout> and <scaletime> tags exist with valid values (scaletime must parse as int)
  2. Re-create the Delay job entry in Spoon and re-save the job
  3. Validate the whole XML file parses (e.g. xmllint) to rule out truncation
  4. Check the chained cause 'e' to see whether it is NumberFormatException vs an XML parse error

Example fix

// before
<scaletime></scaletime>
// after
<scaletime>2</scaletime> <!-- e.g. with scaletype minute -->
Defensive patterns

Strategy: validation

Validate before calling

Node tag = XMLHandler.getTagValue(...) == null ? null : node;
// validate before loadXML
String scale = XMLHandler.getTagValue(entrynode, "scaletime");
if (scale != null && !scale.matches("\\d+")) {
  throw new KettleXMLException("scaletime must be an integer, got: " + scale);
}

Try / catch

try {
  entry.loadXML(entrynode, databases, slaveServers, rep, metaStore);
} catch (KettleXMLException e) {
  log.error("Delay entry XML invalid", e.getCause());
  if (e.getCause() instanceof NumberFormatException) {
    // fix <scaletime>/<maximumTimeout> values in the .kjb and reload
  }
  throw e;
}

Prevention

When it happens

Trigger: loadXML called with an entrynode whose 'maximumTimeout' or 'scaletime' tag is absent, empty, or non-numeric; or the entry node itself is malformed (XMLHandler failure in super.loadXML).

Common situations: Hand-edited or truncated .kjb file; a job XML produced by a different tool/version omitting scaletime; copy-pasting an XML fragment into a job file; encoding corruption.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/delay/JobEntryDelay.java:89

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

    retval.append( super.getXML() );
    retval.append( "      " ).append( XMLHandler.addTagValue( "maximumTimeout", maximumTimeout ) );
    retval.append( "      " ).append( XMLHandler.addTagValue( "scaletime", scaleTime ) );

    return retval.toString();
  }

  @Override
  public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep, IMetaStore metaStore ) throws KettleXMLException {
    try {
      super.loadXML( entrynode, databases, slaveServers );
      maximumTimeout = XMLHandler.getTagValue( entrynode, "maximumTimeout" );
      scaleTime = Integer.parseInt( XMLHandler.getTagValue( entrynode, "scaletime" ) );
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString( PKG, "JobEntryDelay.UnableToLoadFromXml.Label" ), e );
    }
  }

  @Override
  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      maximumTimeout = rep.getJobEntryAttributeString( id_jobentry, "maximumTimeout" );
      scaleTime = (int) rep.getJobEntryAttributeInteger( id_jobentry, "scaletime" );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString( PKG, "JobEntryDelay.UnableToLoadFromRepo.Label" )
        + id_jobentry, dbe );
    }
  }

  //
  // Save the attributes of this job entry
  //

View on GitHub (pinned to f3058517a1)