pentaho/pentaho-kettle · error · KettleException

ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo

Error message

ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo

What it means

ReplaceStringMeta.readRep loads the step's per-field attributes from the repository; any exception is wrapped in KettleException 'ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo'. The stored step configuration could not be read back from the repository.

Solutions

  1. Verify repository connectivity and retry loading the transformation.
  2. Check the step attribute table rows for the ReplaceString id_step.
  3. Re-save/recreate the transformation step from Spoon to rewrite attributes.
  4. Read the chained cause for the underlying repository error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Loading a transformation from a repository where the step attribute rows are missing/corrupt, the repository is unreachable, or stored attribute values are unreadable.

Common situations: Repository database outage; partially deleted KETTLE_STEP_ATTRIBUTES rows; schema mismatch after Pentaho upgrade.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/35d44e5278635862. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java:334

        fieldInStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "in_stream_name" ), "" );
        fieldOutStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "out_stream_name" ), "" );
        useRegEx[i] =
          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, "use_regex" ), "" ) );
        replaceString[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "replace_string" ), "" );
        replaceByString[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "replace_by_string" ), "" );
        setEmptyString[i] = rep.getStepAttributeBoolean( id_step, i, "set_empty_string", false );
        replaceFieldByString[i] =
          Const.NVL( rep.getStepAttributeString( id_step, i, "replace_field_by_string" ), "" );
        wholeWord[i] =
          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, "whole_world" ), "" ) );
        caseSensitive[i] =
          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, "case_sensitive" ), "" ) );
        isUnicode[i] =
          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, "is_unicode" ), "" ) );

      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldInStream.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "in_stream_name", fieldInStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "out_stream_name", fieldOutStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "use_regex", useRegEx[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_string", replaceString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_by_string", replaceByString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "set_empty_string", setEmptyString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_field_by_string", replaceFieldByString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "whole_world", wholeWord[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "case_sensitive", caseSensitive[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "is_unicode", isUnicode[i] );

View on GitHub (pinned to f3058517a1)