{"record":{"id":"e2d22793791139f1","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-mysql-bulk-load-to-the-e2d227","errorCode":null,"errorMessage":"Unable to load job entry of type 'Mysql Bulk Load' to the repository for id_job=","messagePattern":"Unable to load job entry of type 'Mysql 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/mysqlbulkload/JobEntryMysqlBulkLoad.java","lineNumber":207,"sourceCode":"    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(), \"separator\", separator );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"enclosed\", enclosed );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"escaped\", escaped );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"linestarted\", linestarted );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"lineterminated\", lineterminated );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"replacedata\", replacedata );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"ignorelines\", ignorelines );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"listattribut\", listattribut );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"localinfile\", localinfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"prorityvalue\", prorityvalue );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"addfiletoresult\", addfiletoresult );\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 'Mysql 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":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/mysqlbulkload/JobEntryMysqlBulkLoad.java#L189-L225","documentation":"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.","triggerScenarios":"Calling rep.saveJobEntryAttribute(...) or rep.saveDatabaseMetaJobEntryAttribute(...) during saveRep when the underlying repository database throws KettleDatabaseException (e.g. connection lost, constraint violation, schema mismatch).","commonSituations":"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.","solutions":["Check repository database connectivity and retry the save.","Run the repository upgrade/repair tools so R_* tables match the current Pentaho version.","Inspect the wrapped KettleDatabaseException (getCause()) for the real SQL error (constraint, missing column, deadlock) and fix accordingly.","Verify the referenced database connection metadata still exists in the repository."],"exampleFix":"// before\nrep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", connection );\n// after: guard against a null/dangling connection before saving\nif ( connection != null ) {\n  rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", connection );\n} else {\n  logError( \"No connection set for Mysql Bulk Load entry; skipping database meta save\" );\n}","handlingStrategy":"try-catch","validationCode":"// before saving\nif ( connection == null ) logError( \"Database connection not set; save may fail\" );\n// verify repository is reachable\nrep.connect( \"test-repo-check\" );","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.saveRep( rep, metaStore, id_job );\n} catch ( KettleException e ) {\n  logError( \"Repository save failed: \" + e.getCause().getMessage(), e );\n  // surface DB connectivity/schema issue to user before retry\n}","preventionTips":["Keep repository schema upgraded to the Pentaho version in use.","Monitor repository DB connectivity before batch saves.","Always require a valid database connection on job entries that reference one.","Log the wrapped cause, not just the wrapper message."],"tags":["database","repository","persistence","kettle"],"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"}