pentaho/pentaho-kettle · error · KettleXMLException

ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node

ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node

Error message

JobEntryCheckDbConnections.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node

What it means

JobEntryCheckDbConnections.loadXML throws KettleXMLException with ERROR_0001 when the job entry cannot be parsed from its XML node — e.g. reading connection names, waitfor, or waittime values fails. The original XML exception message is appended to the message.

Solutions

  1. Inspect xe.getMessage() in the thrown message to find the exact XML parse failure.
  2. Fix the <field>-style subnodes in the .kjb so each connection entry has name/waitfor/waittime.
  3. Re-create the CheckDbConnections entry in Spoon and set connections/wait settings through the UI.
  4. Verify database names in the entry match connections defined in the transformation's metadata.

Example fix

// before
waittimes[i] = getWaitByCode( Const.NVL( XMLHandler.getTagValue( fnode, "waittime" ), "" ) );
// after (guard against unknown codes at parse site)
String wt = Const.NVL( XMLHandler.getTagValue( fnode, "waittime" ), "" );
waittimes[i] = wt.isEmpty() ? defaultWaitTime : getWaitByCode( wt );
Defensive patterns

Strategy: try-catch

Validate before calling

// validate waittime code is recognized before relying on loadXML
Set<String> valid = Set.of( "millisec", "sec", "min" );
// any <waittime> value read from the XML should be in valid

Try / catch

try { entry.loadXML( entrynode, databases, metaStore ); } catch ( KettleXMLException e ) { logError( "ERROR_0001: " + e.getMessage() ); /* e.getMessage() already embeds the XML cause */ }

Prevention

When it happens

Trigger: loadXML called on a <entry> node whose <connection>/<name>/<waitfor>/<waittime> subnodes are missing or malformed, or getWaitByCode receiving an unrecognized waittime code.

Common situations: Manually edited .kjb files, jobs copied between environments with database names that no longer resolve, or XML produced by incompatible Pentaho versions.

Related errors


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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/job/entries/checkdbconnection/JobEntryCheckDbConnections.java:224

    try {
      super.loadXML( entrynode, databases, slaveServers );
      Node fields = XMLHandler.getSubNode( entrynode, "connections" );

      // How many hosts?
      int nrFields = XMLHandler.countNodes( fields, "connection" );
      connections = new DatabaseMeta[nrFields];
      waitfors = new String[nrFields];
      waittimes = new int[nrFields];
      // Read them all...
      for ( int i = 0; i < nrFields; i++ ) {
        Node fnode = XMLHandler.getSubNodeByNr( fields, "connection", i );
        String dbname = XMLHandler.getTagValue( fnode, "name" );
        connections[i] = DatabaseMeta.findDatabase( databases, dbname );
        waitfors[i] = XMLHandler.getTagValue( fnode, "waitfor" );
        waittimes[i] = getWaitByCode( Const.NVL( XMLHandler.getTagValue( fnode, "waittime" ), "" ) );
      }
    } catch ( KettleXMLException xe ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "JobEntryCheckDbConnections.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node", xe.getMessage() ) );
    }
  }

  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      // How many connections?
      int argnr = rep.countNrJobEntryAttributes( id_jobentry, "id_database" );
      connections = new DatabaseMeta[argnr];
      waitfors = new String[argnr];
      waittimes = new int[argnr];
      // Read them all...
      for ( int a = 0; a < argnr; a++ ) {
        connections[a] =
          rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, "connection", a, "id_database", databases );
        waitfors[a] = rep.getJobEntryAttributeString( id_jobentry, a, "waitfor" );
        waittimes[a] =

View on GitHub (pinned to f3058517a1)