pentaho/pentaho-kettle · error · KettleException

Unable to load job entry of type 'Mysql Bulk Load' to the…

Error message

Unable to load job entry of type 'Mysql Bulk Load' to the repository for id_job=

What it means

This KettleException is thrown by JobEntryMysqlBulkLoad.saveRep when persisting the 'Mysql Bulk Load' job entry attributes to the Kettle repository fails with a KettleDatabaseException. It wraps the underlying database error and identifies the job entry type and id_job so the user knows which entry failed to save.

Solutions

  1. Check repository database connectivity and retry the save.
  2. Run the repository upgrade/repair tools so R_* tables match the current Pentaho version.
  3. Inspect the wrapped KettleDatabaseException (getCause()) for the real SQL error (constraint, missing column, deadlock) and fix accordingly.
  4. Verify the referenced database connection metadata still exists in the repository.

Example fix

// before
rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), "connection", "id_database", connection );
// after: guard against a null/dangling connection before saving
if ( connection != null ) {
  rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), "connection", "id_database", connection );
} else {
  logError( "No connection set for Mysql Bulk Load entry; skipping database meta save" );
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before saving
if ( connection == null ) logError( "Database connection not set; save may fail" );
// verify repository is reachable
rep.connect( "test-repo-check" );

Try / catch

try {
  jobEntry.saveRep( rep, metaStore, id_job );
} catch ( KettleException e ) {
  logError( "Repository save failed: " + e.getCause().getMessage(), e );
  // surface DB connectivity/schema issue to user before retry
}

Prevention

When it happens

Trigger: Calling rep.saveJobEntryAttribute(...) or rep.saveDatabaseMetaJobEntryAttribute(...) during saveRep when the underlying repository database throws KettleDatabaseException (e.g. connection lost, constraint violation, schema mismatch).

Common situations: Repository database is down or network to it dropped mid-save; the repository schema (R_JOBENTRY_ATTRIBUTE table) is missing or outdated after a version upgrade; database metadata referenced by the 'connection' attribute no longer exists; field-value length exceeded column size.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/mysqlbulkload/JobEntryMysqlBulkLoad.java:207

    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "schemaname", schemaname );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "tablename", tablename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "separator", separator );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "enclosed", enclosed );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "escaped", escaped );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "linestarted", linestarted );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "lineterminated", lineterminated );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "replacedata", replacedata );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "ignorelines", ignorelines );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "listattribut", listattribut );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "localinfile", localinfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "prorityvalue", prorityvalue );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "addfiletoresult", addfiletoresult );

      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), "connection", "id_database", connection );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException(
        "Unable to load job entry of type 'Mysql Bulk Load' to the repository for id_job=" + id_job, dbe );
    }
  }

  public void setTablename( String tablename ) {
    this.tablename = tablename;
  }

  public void setSchemaname( String schemaname ) {
    this.schemaname = schemaname;
  }

  public String getSchemaname() {
    return schemaname;
  }

  public String getTablename() {
    return tablename;

View on GitHub (pinned to f3058517a1)