pentaho/pentaho-kettle · error · KettleException

PentahoReportingOutputMeta.Exception.UnexpectedErrorInReadin…

Error message

PentahoReportingOutputMeta.Exception.UnexpectedErrorInReadingStepInfo

What it means

PentahoReportingOutputMeta.readRep reads the step configuration from a repository; any Exception (bad attribute values, unknown processor type code, repository access problems) is wrapped in a KettleException with message PentahoReportingOutputMeta.Exception.UnexpectedErrorInReadingStepInfo. It parallels readData but for the repository storage backend.

Solutions

  1. Check the 'Caused by' for the true repository or parsing error
  2. Verify database/repository connectivity and that the step attributes (KTR/step id) exist in r_step_attribute
  3. Re-save the step configuration in Spoon with a matching plugin version to rewrite valid attribute values
  4. Align plugin versions between the machine that saved the transformation and the one loading it

Example fix

// before
<processor_type>XLS_DOC</processor_type>
// after (valid code)
<processor_type>EXCEL</processor_type>
Defensive patterns

Strategy: try-catch

Validate before calling

// verify repository reachability before loadRep
if ( rep == null || !rep.isConnected() ) {
  throw new KettleException( "Repository not connected" );
}

Try / catch

try {
  meta.readRep( rep, metaStore, idStep, databases );
} catch ( KettleException e ) {
  logError( "Cannot read reporting step from repository: " + e.getMessage(), e );
}

Prevention

When it happens

Trigger: loadRep -> readRep(rep, idStep, ...); rep.getStepAttributeString returns a processor type code that ProcessorType.getProcessorTypeByCode cannot resolve, or the repository call itself throws (connection issue, missing step row).

Common situations: Step definition saved with an older plugin version using a processor code that no longer exists; repository database connectivity problems; step attributes manually deleted or corrupted in the repository tables.

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

Appendix: source

Thrown at plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutputMeta.java:248

      }
      inputFile = rep.getStepAttributeString( idStep, XML_TAG_INPUT_FILE );
      outputFile = rep.getStepAttributeString( idStep, XML_TAG_OUTPUT_FILE );
      useValuesFromFields = rep.getStepAttributeBoolean( idStep, 0, XML_TAG_USE_VALUES_FROM_FIELDS, true );
      createParentFolder = rep.getStepAttributeBoolean( idStep, XML_TAG_CREATE_PARENT_FOLDER );
      parameterFieldMap = new HashMap<String, String>();
      int nrParameters = rep.countNrStepAttributes( idStep, XML_TAG_PARAMETER + "_" + XML_TAG_NAME );
      for ( int i = 0; i < nrParameters; i++ ) {
        String parameter = rep.getStepAttributeString( idStep, i, XML_TAG_PARAMETER + "_" + XML_TAG_NAME );
        String fieldname = rep.getStepAttributeString( idStep, i, XML_TAG_PARAMETER + "_" + XML_TAG_FIELD );
        if ( !Utils.isEmpty( parameter ) && !Utils.isEmpty( fieldname ) ) {
          parameterFieldMap.put( parameter, fieldname );
        }
      }

      outputProcessorType =
        ProcessorType.getProcessorTypeByCode( rep.getStepAttributeString( idStep, XML_TAG_PROCESSOR_TYPE ) );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "PentahoReportingOutputMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep ) throws KettleException {
    try {
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_INPUT_FILE_FIELD, inputFileField );
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_OUTPUT_FILE_FIELD, outputFileField );
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_INPUT_FILE, inputFile );
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_OUTPUT_FILE, outputFile );
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_USE_VALUES_FROM_FIELDS, useValuesFromFields );
      rep.saveStepAttribute( idTransformation, idStep, XML_TAG_CREATE_PARENT_FOLDER, createParentFolder );
      List<String> pars = new ArrayList<String>( parameterFieldMap.keySet() );
      Collections.sort( pars );
      for ( int i = 0; i < pars.size(); i++ ) {
        String parameter = pars.get( i );
        String fieldname = parameterFieldMap.get( parameter );
        rep.saveStepAttribute( idTransformation, idStep, i, XML_TAG_PARAMETER + "_" + XML_TAG_NAME, parameter );

View on GitHub (pinned to f3058517a1)