{"record":{"id":"9f42c3bcf21d8579","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-mssql-bulk-load-to-the","errorCode":null,"errorMessage":"Unable to load job entry of type 'MSsql Bulk Load' to the repository for id_job=","messagePattern":"Unable to load job entry of type 'MSsql Bulk Load' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/mssqlbulkload/JobEntryMssqlBulkLoad.java","lineNumber":290,"sourceCode":"      rep.saveJobEntryAttribute( id_job, getObjectId(), \"checkconstraints\", checkconstraints );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"keepnulls\", keepnulls );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"keepidentity\", keepidentity );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"tablock\", tablock );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"startfile\", startfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"endfile\", endfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"orderby\", orderby );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"orderdirection\", orderdirection );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"errorfilename\", errorfilename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"maxerrors\", maxerrors );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"batchsize\", batchsize );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"rowsperbatch\", rowsperbatch );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"adddatetime\", adddatetime );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"addfiletoresult\", addfiletoresult );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"truncate\", truncate );\n\n      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", connection );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'MSsql Bulk Load' to the repository for id_job=\" + id_job, dbe );\n    }\n  }\n\n  public void setTablename( String tablename ) {\n    this.tablename = tablename;\n  }\n\n  public void setSchemaname( String schemaname ) {\n    this.schemaname = schemaname;\n  }\n\n  public String getSchemaname() {\n    return schemaname;\n  }\n\n  public String getTablename() {\n    return tablename;","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/mssqlbulkload/JobEntryMssqlBulkLoad.java#L272-L308","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the wrapped KettleDatabaseException cause for the JDBC-level error and resolve it (connectivity, permissions, constraints).","Assign a valid, saved database connection to the entry before saving so the connection metadata can be persisted.","Verify the repository user has write privileges on R_JOBENTRY_ATTRIBUTE and related tables.","Retry the save once the repository database is available."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before save: ensure entry has a persistable connection\nif ( jobEntry.getDatabaseConnection() == null ) throw new KettleValidationException( \"assign a database connection before saving\" );","typeGuard":null,"tryCatchPattern":"try { jobEntry.saveRep( rep, metaStore, idJob ); } catch ( KettleException e ) { logError( \"Repository save failed: \" + e.getCause(), e ); /* reconnect and retry */ }","preventionTips":["Assign a valid, saved connection before saving the entry","Verify repository write permissions","Avoid saving during DB maintenance windows","Check cause chain for constraint violations"],"tags":["kettle","repository","database","job-entry","mssql"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}