{"record":{"id":"cae006ce505e2314","repo":"pentaho/pentaho-kettle","slug":"synchronizeaftermergemeta-exception-cae006","errorCode":null,"errorMessage":"SynchronizeAfterMergeMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","messagePattern":"SynchronizeAfterMergeMeta\\.Exception\\.UnexpectedErrorReadingStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMergeMeta.java","lineNumber":590,"sourceCode":"      int nrkeys = rep.countNrStepAttributes( id_step, \"key_name\" );\n      int nrvalues = rep.countNrStepAttributes( id_step, \"value_name\" );\n\n      allocate( nrkeys, nrvalues );\n\n      for ( int i = 0; i < nrkeys; i++ ) {\n        keyStream[i] = rep.getStepAttributeString( id_step, i, \"key_name\" );\n        keyLookup[i] = rep.getStepAttributeString( id_step, i, \"key_field\" );\n        keyCondition[i] = rep.getStepAttributeString( id_step, i, \"key_condition\" );\n        keyStream2[i] = rep.getStepAttributeString( id_step, i, \"key_name2\" );\n      }\n\n      for ( int i = 0; i < nrvalues; i++ ) {\n        updateLookup[i] = rep.getStepAttributeString( id_step, i, \"value_name\" );\n        updateStream[i] = rep.getStepAttributeString( id_step, i, \"value_rename\" );\n        update[i] = Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, \"value_update\", true ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SynchronizeAfterMergeMeta.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      rep.saveStepAttribute( id_transformation, id_step, \"commit\", commitSize );\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, \"tablename_in_field\", tablenameInField );\n      rep.saveStepAttribute( id_transformation, id_step, \"tablename_field\", tablenameField );\n      rep.saveStepAttribute( id_transformation, id_step, \"operation_order_field\", operationOrderField );\n      rep.saveStepAttribute( id_transformation, id_step, \"order_insert\", OrderInsert );\n      rep.saveStepAttribute( id_transformation, id_step, \"order_update\", OrderUpdate );\n      rep.saveStepAttribute( id_transformation, id_step, \"order_delete\", OrderDelete );\n","sourceCodeStart":572,"sourceCodeEnd":608,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMergeMeta.java#L572-L608","documentation":"SynchronizeAfterMergeMeta.readRep() failed while loading the step's settings from the repository database (KettleException 'Unexpected error reading step info from repository'). Any exception raised while reading step attributes (e.g., repository connectivity or schema issues) is wrapped and rethrown.","triggerScenarios":"loadRep() called against a repository where the step attribute tables are unavailable/corrupt, the repository connection drops mid-read, or the stored attributes violate expectations (e.g., null/invalid types).","commonSituations":"Repository database migrated/upgraded with schema mismatch; network interruption between PDI and the repository DB; corrupt rows in R_STEP_ATTRIBUTE.","solutions":["Check repository connectivity and retry opening the transformation","Inspect the 'Caused by' exception to find the failing attribute/query, then repair the repository row or schema","Re-save the step from a working client to rewrite its repository attributes","Restore/recreate the transformation entry in the repository"],"exampleFix":"// typically environmental; re-save via code\ntransMeta = new TransMeta(repository, transName, directory);\n// if a specific attribute is broken, fix row in R_STEP_ATTRIBUTE for id_step","handlingStrategy":"try-catch","validationCode":"// before loadRep\nif (!repository.isConnected()) throw new IllegalStateException(\"Repository not connected\");","typeGuard":null,"tryCatchPattern":"try { stepMeta.loadRep(repository, metaStore, idStep, databases, metaStore); }\ncatch (KettleException e) { log.error(\"Repository read failed for step \" + idStep + \": \" + e.getMessage(), e.getCause()); throw e; }","preventionTips":["Keep repository schema in sync with the PDI client version","Monitor repository DB connectivity/health","Back up R_STEP_ATTRIBUTE rows before migrations","Re-save steps after repository upgrades"],"tags":["kettle","repository","database","metadata"],"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"}