{"record":{"id":"6e1bd4a797ff1052","repo":"pentaho/pentaho-kettle","slug":"execsqlrowmeta-exception-unexpectederrorreadingstepinfo","errorCode":null,"errorMessage":"ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"ExecSQLRowMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java","lineNumber":325,"sourceCode":"      databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, \"id_connection\", databases );\n      commitSize = (int) rep.getStepAttributeInteger( id_step, \"commit\" );\n      sqlField = rep.getStepAttributeString( id_step, \"sql_field\" );\n\n      insertField = rep.getStepAttributeString( id_step, \"insert_field\" );\n      updateField = rep.getStepAttributeString( id_step, \"update_field\" );\n      deleteField = rep.getStepAttributeString( id_step, \"delete_field\" );\n      readField = rep.getStepAttributeString( id_step, \"read_field\" );\n      sqlFromfile = rep.getStepAttributeBoolean( id_step, \"sqlFromfile\" );\n\n      String sendOneStatementString = rep.getStepAttributeString( id_step, \"sendOneStatement\" );\n      if ( Utils.isEmpty( sendOneStatementString ) ) {\n        sendOneStatement = true;\n      } else {\n        sendOneStatement = rep.getStepAttributeBoolean( id_step, \"sendOneStatement\" );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, \"id_connection\", databaseMeta );\n      rep.saveStepAttribute( id_transformation, id_step, \"commit\", commitSize );\n      rep.saveStepAttribute( id_transformation, id_step, \"sql_field\", sqlField );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"insert_field\", insertField );\n      rep.saveStepAttribute( id_transformation, id_step, \"update_field\", updateField );\n      rep.saveStepAttribute( id_transformation, id_step, \"delete_field\", deleteField );\n      rep.saveStepAttribute( id_transformation, id_step, \"read_field\", readField );\n\n      // Also, save the step-database relationship!\n      if ( databaseMeta != null ) {\n        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java#L307-L343","documentation":"KettleException thrown by ExecSQLRowMeta.readRep() when an unexpected Exception occurs while reading the step's attributes (connection, read_field, sqlFromfile, sendOneStatement) from the repository. It wraps the repository exception as a catch-all so the step's metadata cannot be loaded.","triggerScenarios":"Any rep.getStepAttributeString/getStepAttributeBoolean/insertStepDatabase-related call inside readRep() throws — corrupt repository rows, missing id_step, or JDBC failure while loading the transformation.","commonSituations":"Repository schema mismatch after upgrade; step attributes partially deleted; transient DB connectivity failure during transformation load.","solutions":["Inspect getCause() for the underlying repository/JDBC error.","Verify repository connectivity and schema version matches the Pentaho release.","Re-save the step in Spoon to regenerate its repository attributes.","Restore missing rows in the repository step-attribute tables from backup."],"exampleFix":"// before\nTransMeta tm = new TransMeta(rep, \"MyTrans\", dir);\n// after\ntry {\n  TransMeta tm = new TransMeta(rep, \"MyTrans\", dir);\n} catch (KettleException e) {\n  log.error(\"root cause: \", e.getCause());\n}","handlingStrategy":"try-catch","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"repository not connected\");","typeGuard":null,"tryCatchPattern":"try { meta.readRep(rep, metaStore, id_step, null); } catch (KettleException e) { log.error(\"repository read failed: \" + e.getCause(), e); }","preventionTips":["Check repository connectivity before loading","Keep Pentaho and repository schema versions aligned","Inspect getCause() for root cause"],"tags":["repository","metadata-load","kettle"],"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"}