{"record":{"id":"217f26b5bc94883a","repo":"pentaho/pentaho-kettle","slug":"unable-to-begin-processing-by-logging-start-in-logtable-0","errorCode":null,"errorMessage":"Unable to begin processing by logging start in logtable {0}","messagePattern":"Unable to begin processing by logging start in logtable (.+?)","errorType":"exception","errorClass":"KettleJobException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1107,"sourceCode":"        // log record...\n        //\n        addJobListener( new JobAdapter() {\n          @Override public void jobFinished( Job job ) throws KettleException {\n            try {\n              endProcessing();\n            } catch ( KettleJobException e ) {\n              log.logError( BaseMessages.getString( PKG, \"Job.Exception.UnableToWriteToLoggingTable\", jobLogTable\n                  .toString() ), e );\n              // do not skip exception here\n              // job is failed in case log database record is failed!\n              throw new KettleException( e );\n            }\n          }\n        } );\n\n      } catch ( KettleDatabaseException dbe ) {\n        addErrors( 1 ); // This is even before actual execution\n        throw new KettleJobException( BaseMessages.getString( PKG, \"Job.Log.UnableToProcessLoggingStart\", \"\"\n            + tableName ), dbe );\n      } finally {\n        ldb.close();\n      }\n    }\n\n    // If we need to write out the job entry logging information, do so at the end of the job:\n    //\n    JobEntryLogTable jobEntryLogTable = jobMeta.getJobEntryLogTable();\n    if ( jobEntryLogTable.isDefined() ) {\n      addJobListener( new JobAdapter() {\n        @Override public void jobFinished( Job job ) throws KettleException {\n          try {\n            writeJobEntryLogInformation();\n          } catch ( KettleException e ) {\n            throw new KettleException( BaseMessages.getString( PKG,\n                \"Job.Exception.UnableToPerformJobEntryLoggingAtJobEnd\" ), e );\n          }","sourceCodeStart":1089,"sourceCodeEnd":1125,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1089-L1125","documentation":"Thrown when inserting the job-start record into the job log table raises a KettleDatabaseException. Kettle marks an error before execution even begins and aborts with this KettleJobException, chaining the database exception.","triggerScenarios":"Writing the 'start' row to the job log table fails: connection failure, bad credentials, missing table, schema mismatch, or constraint violation during the begin-processing insert.","commonSituations":"Log database is down or unreachable; job log table was dropped or has an outdated schema; wrong connection configured for the job's logging settings; insufficient INSERT permissions.","solutions":["Test the log table's database connection (credentials, host, port)","Verify the job log table exists and matches the expected schema (regenerate DDL)","Check the database user has INSERT privileges on the log table","Read the chained KettleDatabaseException for the exact SQL error"],"exampleFix":"// before\n<connection>logdb</connection> pointing to a dropped database\n// after\nRecreate logdb connection and run generated DDL to create the job log table","handlingStrategy":"try-catch","validationCode":"try (Connection c = logDb.connect()) {\n  DatabaseMetaData md = c.getMetaData();\n  if (!c.isValid(5)) throw new IllegalStateException(\"Log DB not reachable\");\n  ResultSet rs = md.getTables(null, null, jobLogTable.getTableName(), null);\n  if (!rs.next()) throw new IllegalStateException(\"Job log table missing\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  job.run();\n} catch (KettleJobException e) {\n  if (e.getMessage().startsWith(\"Unable to begin processing by logging start\")) {\n    Throwable dbe = e.getCause(); // KettleDatabaseException\n    log.error(\"Insert into job log table failed: \" + dbe.getMessage(), dbe);\n  }\n}","preventionTips":["Test the logging DB connection before starting the job","Grant INSERT privileges to the Kettle DB user","Verify log table existence/schema at deploy time"],"tags":["database","logging","connection"],"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"}