pentaho/pentaho-kettle · error · KettleException

GetFilesRowsCountMeta.Exception.ErrorReadingRepository

Error message

GetFilesRowsCountMeta.Exception.ErrorReadingRepository

What it means

GetFilesRowsCountMeta.readRep() wraps any exception raised while loading this step's attributes from the Kettle repository into a KettleException with localized message GetFilesRowsCountMeta.Exception.ErrorReadingRepository. The step metadata could not be read, so the transformation fails to load from the repository.

Solutions

  1. Check repository connectivity and re-open the transformation.
  2. Inspect the wrapped cause for the underlying SQL/schema error.
  3. Re-save the step with the current plugin version to rewrite attributes.
  4. Verify the repository schema matches the installed Kettle version (run upgrade scripts).

Example fix

// before
String v = rep.getStepAttributeString(id_step, "file_mask");
String[] masks = new String[]{ v }; // assumes present
// after
String v = rep.getStepAttributeString(id_step, "file_mask");
if (v == null) { v = ""; logDetailed("file_mask missing for step, defaulting to empty"); }
Defensive patterns

Strategy: try-catch

Validate before calling

if (!repository.isConnected()) { throw new IllegalStateException("Repository not connected; cannot load transformation"); }

Try / catch

try { transMeta.loadTransMeta(rep, dir, name, metaStore); } catch (KettleException e) { if (e.getMessage().contains("ErrorReadingRepository")) { log.error("Repository read failed: ", e.getCause()); } throw e; }

Prevention

When it happens

Trigger: readRep (public) executes and a rep.getStepAttribute(...) call or subsequent array index/parse fails: missing step attributes in the repository, DB errors, or attribute values in unexpected format.

Common situations: Repository rows for the step were partially deleted; schema mismatch between plugin versions (attribute keys renamed); repository connectivity problems during load.

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/6f9ff4eca07e2f7a. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getfilesrowscount/GetFilesRowsCountMeta.java:546

      allocate( nrFiles );

      for ( int i = 0; i < nrFiles; i++ ) {
        fileName[i] = rep.getStepAttributeString( id_step, i, "file_name" );
        fileMask[i] = rep.getStepAttributeString( id_step, i, "file_mask" );
        excludeFileMask[i] = rep.getStepAttributeString( id_step, i, "exclude_file_mask" );
        fileRequired[i] = rep.getStepAttributeString( id_step, i, "file_required" );
        if ( !YES.equalsIgnoreCase( fileRequired[i] ) ) {
          fileRequired[i] = NO;
        }
        includeSubFolders[i] = rep.getStepAttributeString( id_step, i, "include_subfolders" );
        if ( !YES.equalsIgnoreCase( includeSubFolders[i] ) ) {
          includeSubFolders[i] = NO;
        }
      }

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

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {

      rep.saveStepAttribute( id_transformation, id_step, "files_count", includeFilesCount );
      rep.saveStepAttribute( id_transformation, id_step, "files_count_fieldname", filesCountFieldName );
      rep.saveStepAttribute( id_transformation, id_step, "rows_count_fieldname", rowsCountFieldName );
      rep.saveStepAttribute( id_transformation, id_step, "rowseparator_format", RowSeparator_format );
      rep.saveStepAttribute( id_transformation, id_step, "row_separator", RowSeparator );
      rep.saveStepAttribute( id_transformation, id_step, "isaddresult", isaddresult );
      rep.saveStepAttribute( id_transformation, id_step, "smartCount", smartCount );

      rep.saveStepAttribute( id_transformation, id_step, "filefield", filefield );
      rep.saveStepAttribute( id_transformation, id_step, "filename_Field", outputFilenameField );

View on GitHub (pinned to f3058517a1)