{"record":{"id":"3dcba910cb87314e","repo":"pentaho/pentaho-kettle","slug":"gpbulkloadermeta-exception-3dcba9","errorCode":"GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","errorMessage":"GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","messagePattern":"GPBulkLoaderMeta\\.Exception\\.UnexpectedErrorReadingStepInfoFromRepository","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java","lineNumber":321,"sourceCode":"      tableName = rep.getStepAttributeString( id_step, \"table\" );\n      loadAction = rep.getStepAttributeString( id_step, \"load_action\" );\n      stopOnError = rep.getStepAttributeBoolean( id_step, \"stop_on_error\" );\n\n      dbNameOverride = rep.getStepAttributeString( id_step, \"dbname_override\" );\n      enclosure = rep.getStepAttributeString( id_step, \"enclosure\" );\n      delimiter = rep.getStepAttributeString( id_step, \"delimiter\" );\n\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        dateMask[i] = rep.getStepAttributeString( id_step, i, \"date_mask\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"GPBulkLoaderMeta.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\n      rep.saveStepAttribute( id_transformation, id_step, \"schema\", schemaName );\n      rep.saveStepAttribute( id_transformation, id_step, \"table\", tableName );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"load_action\", loadAction );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"dbname_override\", dbNameOverride );\n      rep.saveStepAttribute( id_transformation, id_step, \"enclosure\", enclosure );\n      rep.saveStepAttribute( id_transformation, id_step, \"delimiter\", delimiter );\n      rep.saveStepAttribute( id_transformation, id_step, \"stop_on_error\", stopOnError );\n","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java#L303-L339","documentation":"readRep loads the step's metadata from the Pentaho Repository; any exception while reading step attributes is wrapped in a KettleException with key GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository. The stored repository definition could not be read.","triggerScenarios":"loadXML-equivalent readRep(id_step...) throws while calling rep.getStepAttributeString / getNumberAttribute for table/stream fields and date masks — repository connectivity issues, missing attributes, or repository API errors.","commonSituations":"Repository server unreachable or session expired mid-load; repository row for the step partially written (missing attributes); corrupted repository database after an interrupted save; permission problems reading the transformation.","solutions":["Check repository connectivity (login, network, repository service) and retry opening the transformation","Compare the stored step attributes in the repository (r_step_attribute rows for id_step) and repair/re-save the step in Spoon","Recreate the step metadata in Spoon and save it back to the repository to rewrite its attributes","Inspect the wrapped cause exception for the exact repository error (SQL, auth, missing object)"],"exampleFix":"// cause often surfaces in the wrapped exception — log it\ntry {\n  readRep( rep, metaStore, id_step, nr );\n} catch ( KettleException ke ) {\n  logError( \"repository read failed\", ke ); // inspect ke.getCause() for the real repo error\n  throw ke;\n}","handlingStrategy":"try-catch","validationCode":"// pre-check repository access before loading metadata\nif ( !repository.isConnected() || repository.findStep( id_step ) == null ) {\n  throw new IllegalStateException( \"Repository not accessible or step object missing\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadRep( repo, metaStore, transObjectId, null, null );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"UnexpectedErrorReadingStepInfoFromRepository\" ) ) {\n    log.error( \"Repo read failed\", e.getCause() ); // cause names the repository error\n    // re-save the step in Spoon or check repository connectivity\n  }\n}","preventionTips":["Confirm repository connectivity before opening scheduled transformations","Avoid interrupted saves; verify transformation integrity after repository failures","Grant read permissions on transformation objects to service accounts","Monitor repository database health in shared environments"],"tags":["kettle","repository","metadata","persistence"],"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"}