pentaho/pentaho-kettle · error · KettleException

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

Error message

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

What it means

KettleException thrown by JobEntryMssqlBulkLoad.saveRep() when writing the 'MSsql Bulk Load' entry's attributes (schemaname, tablename, filename, connection, etc.) to the repository fails with a KettleDatabaseException, notably saveDatabaseMetaJobEntryAttribute. It is a repository write failure while persisting this job entry.

Solutions

  1. Check the wrapped KettleDatabaseException cause for the JDBC-level error and resolve it (connectivity, permissions, constraints).
  2. Assign a valid, saved database connection to the entry before saving so the connection metadata can be persisted.
  3. Verify the repository user has write privileges on R_JOBENTRY_ATTRIBUTE and related tables.
  4. Retry the save once the repository database is available.
Defensive patterns

Strategy: try-catch

Validate before calling

// before save: ensure entry has a persistable connection
if ( jobEntry.getDatabaseConnection() == null ) throw new KettleValidationException( "assign a database connection before saving" );

Try / catch

try { jobEntry.saveRep( rep, metaStore, idJob ); } catch ( KettleException e ) { logError( "Repository save failed: " + e.getCause(), e ); /* reconnect and retry */ }

Prevention

When it happens

Trigger: Calling saveRep() when saveJobEntryAttribute or saveDatabaseMetaJobEntryAttribute(id_job, getObjectId(), "connection", "id_database", connection) throws — repository DB down, constraint violation, null connection object, or locked tables.

Common situations: Saving a job whose bulk-load entry points to a connection that was never persisted; repository user lacks write permission; database maintenance window/downtime during save.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/mssqlbulkload/JobEntryMssqlBulkLoad.java:290

      rep.saveJobEntryAttribute( id_job, getObjectId(), "checkconstraints", checkconstraints );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "keepnulls", keepnulls );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "keepidentity", keepidentity );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "tablock", tablock );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "startfile", startfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "endfile", endfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "orderby", orderby );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "orderdirection", orderdirection );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "errorfilename", errorfilename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "maxerrors", maxerrors );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "batchsize", batchsize );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "rowsperbatch", rowsperbatch );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "adddatetime", adddatetime );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "addfiletoresult", addfiletoresult );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "truncate", truncate );

      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), "connection", "id_database", connection );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException(
        "Unable to load job entry of type 'MSsql 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)