pentaho/pentaho-kettle · error · KettleXMLException

Unable to load job entry of type 'trans' from XML node

Error message

Unable to load job entry of type 'trans' from XML node

What it means

Thrown by JobEntryTrans.loadXML when loading a Transformation ('trans') job entry from an XML node fails with a KettleException. It signals the entry's XML (including run configuration and parameter sub-nodes) could not be parsed into the object. The original exception is wrapped as the cause.

Solutions

  1. Inspect the wrapped KettleException cause for the exact parsing failure
  2. Validate/repair the trans job entry XML node in the .kjb file
  3. Re-save the job in a Spoon version matching the execution runtime
  4. Re-create the Transformation job entry if the XML is unrecoverable
Defensive patterns

Strategy: try-catch

Validate before calling

if ( XMLHandler.getTagValue( entrynode, "transname" ) == null && XMLHandler.getTagValue( entrynode, "filename" ) == null ) { throw new IllegalStateException( "trans entry missing transformation reference" ); }

Try / catch

try { entry.loadXML( entrynode, databases, slaveServers, rep, metaStore ); } catch ( KettleXMLException e ) { log.error( "Bad trans entry XML", e.getCause() ); }

Prevention

When it happens

Trigger: Loading a .kjb file whose trans job entry node is malformed or references unreadable content while XMLHandler parses fields like transformation name, run configuration, and parameter arrays (name/stream_name/value).

Common situations: Jobs saved by a newer Pentaho version then loaded by an older runtime; corrupted or hand-edited job files; inconsistent parameter block XML; file truncation during transfer.

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/c573244382104956. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/trans/JobEntryTrans.java:460

      }

      Node parametersNode = XMLHandler.getSubNode( entrynode, "parameters" );

      String passAll = XMLHandler.getTagValue( parametersNode, "pass_all_parameters" );
      passingAllParameters = Utils.isEmpty( passAll ) || "Y".equalsIgnoreCase( passAll );

      int nrParameters = XMLHandler.countNodes( parametersNode, "parameter" );
      allocateParams( nrParameters );

      for ( int i = 0; i < nrParameters; i++ ) {
        Node knode = XMLHandler.getSubNodeByNr( parametersNode, "parameter", i );

        parameters[ i ] = XMLHandler.getTagValue( knode, "name" );
        parameterFieldNames[ i ] = XMLHandler.getTagValue( knode, "stream_name" );
        parameterValues[ i ] = XMLHandler.getTagValue( knode, "value" );
      }
    } catch ( KettleException e ) {
      throw new KettleXMLException( "Unable to load job entry of type 'trans' from XML node", e );
    }
  }

  // Load the jobentry from repository
  //
  @Override
  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
                       List<SlaveServer> slaveServers ) throws KettleException {
    try {
      String method = rep.getJobEntryAttributeString( id_jobentry, "specification_method" );
      specificationMethod = ObjectLocationSpecificationMethod.getSpecificationMethodByCode( method );
      String transId = rep.getJobEntryAttributeString( id_jobentry, "trans_object_id" );
      transObjectId = Utils.isEmpty( transId ) ? null : new StringObjectId( transId );
      transname = rep.getJobEntryAttributeString( id_jobentry, "name" );
      directory = rep.getJobEntryAttributeString( id_jobentry, "dir_path" );
      filename = rep.getJobEntryAttributeString( id_jobentry, "file_name" );

      // Backward compatibility check for object specification

View on GitHub (pinned to f3058517a1)