pentaho/pentaho-kettle · error · KettleException

JsonInputMeta.Exception.ErrorReadingRepository

JsonInputMeta.Exception.ErrorReadingRepository

Error message

JsonInputMeta.Exception.ErrorReadingRepository

What it means

KettleException with message key JsonInputMeta.Exception.ErrorReadingRepository, thrown by JsonInputMeta.readRep when any exception occurs loading the step's attributes from the repository (database) by id_step. It means the step definition could not be read from the repository storage.

Solutions

  1. Check the wrapped cause in the log — usually a repository DB connectivity error; restore the connection and retry.
  2. Verify the step's rows exist in R_STEP_ATTRIBUTE for the given id_step (query by ID_STEP).
  3. Re-save the transformation from Spoon to rewrite the step attributes.
  4. If after an upgrade, run the repository upgrade scripts so the schema matches your PDI version.

Example fix

// before: readRep fails on stale connection
DatabaseMeta stale = ...; // connection dropped
// after: validate connection before opening transformations
if (!rep.testConnectionSuccess()) { rep.connect(); }
TransMeta tm = new TransMeta(rep, transName, dir);
Defensive patterns

Strategy: retry

Validate before calling

// check repository health before loading
if (!rep.testConnectionSuccess()) { throw new IllegalStateException("Repository unreachable"); }

Try / catch

try { transMeta = new TransMeta(rep, name, dir); }
catch (KettleException e) {
  if (getRootCause(e) instanceof SQLException && isTransient(e)) { rep.disconnect(); rep.connect(); /* retry once */ }
  else throw e;
}

Prevention

When it happens

Trigger: readRep -> rep.getStepAttributeString / field-loading loop throws: repository DB connection failure, missing step row in R_STEP_ATTRIBUTE, schema mismatch, or invalid field attribute values while reconstructing JsonInputField entries.

Common situations: Repository database temporarily down or connection dropped; transformation referencing a step deleted by another user; repository schema version mismatch after a PDI upgrade; corrupted attribute rows.

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/9cc23dab773642c9. Report an issue: GitHub.

Appendix: source

Thrown at plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInputMeta.java:931

        field.setRepeated( rep.getStepAttributeBoolean( id_step, i, "field_repeat" ) );

        getInputFields()[i] = field;
      }
      setInFields( rep.getStepAttributeBoolean( id_step, "IsInFields" ) );
      isAFile = rep.getStepAttributeBoolean( id_step, "IsAFile" );

      valueField = rep.getStepAttributeString( id_step, "valueField" );

      setShortFileNameField( rep.getStepAttributeString( id_step, "shortFileFieldName" ) );
      setPathField( rep.getStepAttributeString( id_step, "pathFieldName" ) );
      setIsHiddenField( rep.getStepAttributeString( id_step, "hiddenFieldName" ) );
      setLastModificationDateField( rep.getStepAttributeString( id_step, "lastModificationTimeFieldName" ) );
      setUriField( rep.getStepAttributeString( id_step, "uriNameFieldName" ) );
      setRootUriField( rep.getStepAttributeString( id_step, "rootUriNameFieldName" ) );
      setExtensionField( rep.getStepAttributeString( id_step, "extensionFieldName" ) );
      setSizeField( rep.getStepAttributeString( id_step, "sizeFieldName" ) );
    } catch ( Exception e ) {
      throw new KettleException(
        BaseMessages.getString( PKG, "JsonInputMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
    throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "include", includeFilename );
      rep.saveStepAttribute( id_transformation, id_step, "include_field", filenameField );
      rep.saveStepAttribute( id_transformation, id_step, "addresultfile", addResultFile );
      rep.saveStepAttribute( id_transformation, id_step, "readurl", readurl );

      rep.saveStepAttribute( id_transformation, id_step, "removeSourceField", removeSourceField );

      rep.saveStepAttribute( id_transformation, id_step, "IsIgnoreEmptyFile", isIgnoreEmptyFile );
      rep.saveStepAttribute( id_transformation, id_step, "ignoreMissingPath", ignoreMissingPath );
      rep.saveStepAttribute( id_transformation, id_step, "defaultPathLeafToNull", defaultPathLeafToNull );

View on GitHub (pinned to f3058517a1)