{"record":{"id":"c01f59e4984528df","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-mssql-bulk-load-from-the","errorCode":null,"errorMessage":"Unable to load job entry of type 'MSsql bulk load' from the repository for id_jobentry=","messagePattern":"Unable to load job entry of type 'MSsql bulk load' from the repository for id_jobentry=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/mssqlbulkload/JobEntryMssqlBulkLoad.java","lineNumber":254,"sourceCode":"\n      startfile = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"startfile\" );\n      endfile = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"endfile\" );\n\n      orderby = rep.getJobEntryAttributeString( id_jobentry, \"orderby\" );\n      orderdirection = rep.getJobEntryAttributeString( id_jobentry, \"orderdirection\" );\n\n      errorfilename = rep.getJobEntryAttributeString( id_jobentry, \"errorfilename\" );\n      maxerrors = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"maxerrors\" );\n      batchsize = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"batchsize\" );\n      rowsperbatch = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"rowsperbatch\" );\n      adddatetime = rep.getJobEntryAttributeBoolean( id_jobentry, \"adddatetime\" );\n\n      addfiletoresult = rep.getJobEntryAttributeBoolean( id_jobentry, \"addfiletoresult\" );\n      truncate = rep.getJobEntryAttributeBoolean( id_jobentry, \"truncate\" );\n\n      connection = rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, \"connection\", \"id_database\", databases );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'MSsql bulk load' from the repository for id_jobentry=\" + id_jobentry,\n        dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"schemaname\", schemaname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"tablename\", tablename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"filename\", filename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"datafiletype\", datafiletype );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"fieldterminator\", fieldterminator );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"lineterminated\", lineterminated );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"codepage\", codepage );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"specificcodepage\", specificcodepage );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"formatfilename\", formatfilename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"firetriggers\", firetriggers );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"checkconstraints\", checkconstraints );","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/mssqlbulkload/JobEntryMssqlBulkLoad.java#L236-L272","documentation":"KettleException thrown by JobEntryMssqlBulkLoad.loadRep() when reading the 'MSsql bulk load' entry's attributes from the repository fails with a KettleDatabaseException, including loading the associated database connection metadata. It means the stored definition of this job entry cannot be fetched from the repository.","triggerScenarios":"Loading a job from a repository when getJobEntryAttributeBoolean/Integer or loadDatabaseMetaFromJobEntryAttribute(id_jobentry, \"connection\", \"id_database\", databases) throws — missing attribute rows, broken id_database reference, or repository connection failure.","commonSituations":"The connection referenced by id_database was deleted from the repository; R schema out of sync; repository read permissions restricted; corrupted attribute rows after a partial save.","solutions":["Inspect the wrapped KettleDatabaseException cause to find the failing SQL/query and fix the repository database.","Recreate the missing connection in the repository so id_database resolves.","Run repository schema upgrade/repair to restore missing attribute rows or columns.","Recreate the job entry in the repository if its rows are corrupted."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before load: check connection reference exists\nObjectId connId = rep.findDatabaseId( databases, dbname );\nif ( connId == null ) throw new KettleException( \"connection not found in repository for job entry\" );","typeGuard":null,"tryCatchPattern":"try { jobEntry.loadRep( rep, metaStore, idJobentry, databases, slaveServers ); } catch ( KettleException e ) { logError( \"Repository load failed: \" + e.getCause(), e ); }","preventionTips":["Never delete database connections still referenced by jobs","Keep repository schema upgraded/repaired","Grant read privileges on R_JOBENTRY_ATTRIBUTE to repository users","Log the full cause chain of KettleDatabaseException"],"tags":["kettle","repository","database","job-entry","mssql"],"backgroundTag":"database-query-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"}