{"record":{"id":"4aa1c590d00c000e","repo":"pentaho/pentaho-kettle","slug":"deletemeta-exception-unexpectederrorinreadingstepinfo","errorCode":"DeleteMeta.Exception.UnexpectedErrorInReadingStepInfo","errorMessage":"DeleteMeta.Exception.UnexpectedErrorInReadingStepInfo","messagePattern":"DeleteMeta\\.Exception\\.UnexpectedErrorInReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java","lineNumber":311,"sourceCode":"        if ( comSz >= 0 ) {\n          commitSize = Long.toString( comSz );\n        }\n      }\n      schemaName = rep.getStepAttributeString( id_step, TAG_SCHEMA );\n      tableName = rep.getStepAttributeString( id_step, TAG_TABLE );\n\n      int nrkeys = rep.countNrStepAttributes( id_step, TAG_KEY_FIELD );\n\n      allocate( nrkeys );\n\n      for ( int i = 0; i < nrkeys; i++ ) {\n        keyFields[i].setKeyStream( rep.getStepAttributeString( id_step, i, TAG_KEY_NAME ) );\n        keyFields[i].setKeyLookup( rep.getStepAttributeString( id_step, i, TAG_KEY_FIELD ) );\n        keyFields[i].setKeyCondition( rep.getStepAttributeString( id_step, i, TAG_KEY_CONDITION ) );\n        keyFields[i].setKeyStream2( rep.getStepAttributeString( id_step, i, TAG_KEY_NAME2 ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n              PKG, \"DeleteMeta.Exception.UnexpectedErrorInReadingStepInfo\" ), 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, TAG_ID_CONNECTION, databaseMeta );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_COMMIT, commitSize );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_SCHEMA, schemaName );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_TABLE, tableName );\n\n      for ( int i = 0; i < keyFields.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_NAME, keyFields[i].getKeyStream() );\n        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_FIELD, keyFields[i].getKeyLookup() );\n        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_CONDITION, keyFields[i].getKeyCondition() );\n        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_NAME2, keyFields[i].getKeyStream2() );\n      }\n","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java#L293-L329","documentation":"DeleteMeta.readRep loads the step configuration from a repository (database). Any exception while reading step attributes (key stream/lookup/condition/name2 per key field) is wrapped in a KettleException with this generic message plus the root cause. It means the Delete step's metadata could not be loaded from the repository.","triggerScenarios":"readRep calls rep.getStepAttributeString(...) for key fields and any underlying repository exception (connection failure, missing rows, schema mismatch) occurs; caught and rethrown as KettleException.","commonSituations":"Repository database unavailable or schema not upgraded after a Pentaho version change; orphaned step rows; network drop mid-load; loading a transformation whose step attributes were partially deleted.","solutions":["Check the cause of the KettleException for the repository-level error (connectivity, SQL, missing table).","Verify the repository connection and that the repository schema version matches your Pentaho version (run the repository upgrade tool if needed).","Re-save the transformation/step from Spoon to repopulate the repository attributes.","If only one transformation fails, recreate the Delete step in that transformation."],"exampleFix":"// before\nrep connection pointing at r_schema v5 while running Pentaho v9\n// after\nrun repository upgrade scripts so r_step_attribute matches the current Pentaho version","handlingStrategy":"try-catch","validationCode":"// Before loading: check repository reachability\nif (!repository.connect(username, password).isEmpty()) { throw new IllegalStateException(\"repo unavailable\"); }","typeGuard":null,"tryCatchPattern":"try { transMeta.loadFromRepository(dir, monitor, null); } catch (KettleException e) {\n  log.error(\"Repository read failed for step {}: {}\", stepId, e.getCause(), e);\n}","preventionTips":["Keep the repository schema version aligned with the Pentaho version.","Monitor repository DB connectivity before batch jobs.","Re-save steps after repository maintenance.","Check the cause chain to distinguish connectivity vs schema issues."],"tags":["repository","kettle-metadata","database"],"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"}