pentaho/pentaho-kettle · error · KettleXMLException

Unable to read Job Entry copy info from XML node : ...

Error message

Unable to read Job Entry copy info from XML node : ...

What it means

KettleXMLException thrown by JobEntryCopy.loadXML when parsing a job entry's <entry> XML node fails for any reason (malformed XML, missing attributes, exceptions inside JobEntryInterface.loadXML). The wrapper message includes the underlying throwable's toString, so the real cause is appended.

Solutions

  1. Read the wrapped cause (e.getMessage()/getCause()) — it names the actual failing field or missing plugin
  2. Verify the job entry plugin (e.g. the entry_type) is installed in plugins/ directory
  3. Open the .kjb in Spoon to repair or delete the broken entry node
  4. Re-export or regenerate the job XML from a working version

Example fix

// before: loading a job file with a corrupt entry blindly
JobMeta job = new JobMeta(transMetaFilename, repository, metastore);
// after: validate and report the failing entry
try {
  JobMeta job = new JobMeta(transMetaFilename, repository, metastore);
} catch (KettleXMLException e) {
  logError("Job XML invalid: " + e.getMessage() + ", cause=" + e.getCause());
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate job XML before loading
org.w3c.dom.Document doc = org.pentaho.di.core.xml.XMLHandler.loadXMLFile(new java.io.File(jobXmlPath));
org.w3c.dom.NodeList entries = doc.getElementsByTagName("entry");
for (int i = 0; i < entries.getLength(); i++) {
  String type = org.pentaho.di.core.xml.XMLHandler.getTagValue(entries.item(i), "type");
  if (type == null || org.pentaho.di.core.Const.isEmpty(type)) throw new IllegalStateException("entry #" + i + " missing type");
}

Type guard

static boolean hasEntryType(org.w3c.dom.Node entrynode) {
  return org.pentaho.di.core.xml.XMLHandler.getTagValue(entrynode, "type") != null;
}

Try / catch

try {
  JobMeta job = new JobMeta(jobXmlPath, repository, metaStore);
} catch (KettleXMLException e) {
  // e.getCause() holds the real parse/plugin error
  throw new RuntimeException("Invalid job XML at " + jobXmlPath + ": " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Calling JobEntryInterface.getObject().loadXML(entrynode, ...) indirectly via JobMeta loading a .kjb file whose entry node is corrupt, references a missing plugin type, or has an unreadable attributes node.

Common situations: Hand-edited or truncated .kjb job files; jobs exported from a newer PDI version with entry types whose plugin is not installed; XML with wrong encoding or removed required sub-nodes.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entry/JobEntryCopy.java:170

        int y = Const.toInt( XMLHandler.getTagValue( entrynode, "yloc" ), 0 );
        setLocation( x, y );

        Node jobEntryCopyAttributesNode = XMLHandler.getSubNode( entrynode, XML_ATTRIBUTE_JOB_ENTRY_COPY );
        if ( jobEntryCopyAttributesNode != null ) {
          attributesMap = AttributesUtil.loadAttributes( jobEntryCopyAttributesNode );
        } else {
          // [PDI-17345] If the appropriate attributes node wasn't found, this must be an old file (prior to this fix).
          // Before this fix it was very probable to exist two attributes groups. While this is not very valid, in some
          // scenarios the Job worked as expected; so by trying to load the LAST one into the JobEntryCopy, we
          // simulate that behaviour.
          attributesMap =
            AttributesUtil.loadAttributes( XMLHandler.getLastSubNode( entrynode, AttributesUtil.XML_TAG ) );
        }

        setDeprecationAndSuggestedJobEntry();
      }
    } catch ( Throwable e ) {
      String message = "Unable to read Job Entry copy info from XML node : " + e.toString();
      throw new KettleXMLException( message, e );
    }
  }


  /**
   * Backward compatible loading of XML, using deprecated method.
   *
   * @param entrynode
   * @param databases
   * @param slaveServers
   * @param rep
   * @throws KettleXMLException
   */
  @SuppressWarnings( "deprecation" )
  protected void compatibleLoadXml( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep ) throws KettleXMLException {
    entry.loadXML( entrynode, databases, slaveServers, rep );

View on GitHub (pinned to f3058517a1)