{"record":{"id":"a2cea8b2d8c445b5","repo":"pentaho/pentaho-kettle","slug":"monetdbbulkloadermeta-exception","errorCode":"MonetDBBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","errorMessage":"MonetDBBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","messagePattern":"MonetDBBulkLoaderMeta\\.Exception\\.UnexpectedErrorReadingStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java","lineNumber":442,"sourceCode":"      }\n      truncate = Boolean.parseBoolean( rep.getStepAttributeString( id_step, \"truncate\" ) );\n\n      // This expression will only return true if a yes value was previously recorded; false otherwise.\n      fullyQuoteSQL = Boolean.parseBoolean( rep.getStepAttributeString( id_step, \"fully_quote_sql\" ) );\n      int nrvalues = rep.countNrStepAttributes( id_step, \"stream_name\" );\n\n      allocate( nrvalues );\n\n      for ( int i = 0; i < nrvalues; i++ ) {\n        fieldTable[i] = rep.getStepAttributeString( id_step, i, \"stream_name\" );\n        fieldStream[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        if ( fieldStream[i] == null ) {\n          fieldStream[i] = fieldTable[i];\n        }\n        fieldFormatOk[i] = rep.getStepAttributeBoolean( id_step, i, \"field_format_ok\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n          PKG, \"MonetDBBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository\" ), 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      // General Settings Tab\n      rep.saveStepAttribute( id_transformation, id_step, \"db_connection_name\", dbConnectionName );\n      rep.saveStepAttribute( id_transformation, id_step, \"schema\", schemaName );\n      rep.saveStepAttribute( id_transformation, id_step, \"table\", tableName );\n      rep.saveStepAttribute( id_transformation, id_step, \"buffer_size\", bufferSize );\n      rep.saveStepAttribute( id_transformation, id_step, \"log_file\", logFile );\n      rep.saveStepAttribute( id_transformation, id_step, \"truncate\", truncate );\n      rep.saveStepAttribute( id_transformation, id_step, \"fully_quote_sql\", fullyQuoteSQL );\n\n      // MonetDB Settings Tab\n      rep.saveStepAttribute( id_transformation, id_step, TAG_FIELD_SEPARATOR, fieldSeparator );","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java#L424-L460","documentation":"MonetDBBulkLoaderMeta.readRep() wraps any Exception thrown while restoring this step's configuration from the repository in a KettleException carrying the 'UnexpectedErrorReadingStepInfoFromRepository' message. It means repository metadata for the step (field mappings, stream/table field names, format flags) could not be read, e.g. a repository I/O problem or corrupt/unexpected step attributes. The original exception is preserved as the cause.","triggerScenarios":"Calling readRep() when the underlying Repository throws (connection dropped, missing step attributes for id_step, a null/incompatible attribute value, or repository schema mismatch) — the generic catch around the whole attribute-reading loop converts any such failure into this error.","commonSituations":"Opening a transformation whose MonetDBBulkLoader step was saved by a different Pentaho/Kettle version; repository database temporarily unreachable; a corrupted repository row for the step; manually edited r_step_attribute rows.","solutions":["Check the cause chain of the KettleException for the real repository error (usually a KettleDatabaseException) and fix that underlying problem first","Verify the repository connection is available and the user can read r_step_attribute for this transformation","Re-open and re-save the transformation in Spoon to rewrite the step attributes","If caused by a version upgrade, upgrade the plugin or recreate the MonetDBBulkLoader step"],"exampleFix":"// before\nmeta.readRep(rep, metaStore, stepId, databases);\n// after\ntry {\n  meta.readRep(rep, metaStore, stepId, databases);\n} catch (KettleException e) {\n  logError(\"Failed to read MonetDBBulkLoader step info from repository\", e); // inspect e.getCause()\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// Verify repository access before loading metadata\nif (rep == null || !rep.isConnected()) {\n  throw new KettleException(\"Repository is not connected\");\n}\nObjectId stepId = transMeta.getStep(stepname).getStepMetaInterface() != null ? stepObjectId : null;\nif (stepId == null) throw new KettleException(\"Step not persisted in repository\");","typeGuard":"boolean canReadStep(Repository rep, ObjectId idStep) {\n  try {\n    return rep != null && idStep != null && rep.getStepAttributeString(idStep, \"field_format_ok\") != null || true; // attributes may be optional; check connection instead\n  } catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n  meta.readRep(rep, metaStore, idStep, databases);\n} catch (KettleException e) {\n  Throwable cause = e.getCause();\n  // branch on cause type: KettleDatabaseException => repository I/O, else attribute problem\n  throw new KettleException(\"Reading MonetDBBulkLoader metadata failed: \" + (cause != null ? cause.getMessage() : \"unknown\"), e);\n}","preventionTips":["Always ensure the repository connection is alive before loading transformations","Keep Kettle and the monet-db-bulk-loader plugin versions consistent between save and read","Back up and validate repository tables; avoid manual edits to r_step_attribute","After a Kettle upgrade, re-save affected transformations to rewrite step attributes"],"tags":["repository","pdi","metadata-read","deserialization"],"backgroundTag":"file-read-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"}