pentaho/pentaho-kettle · error · KettleException

DBProcMeta.Exception.UnexpectedErrorReadingStepInfo

DBProcMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

DBProcMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

DBProcMeta.readRep loads the DB Procedure step configuration from the repository. Any repository read or value-conversion exception (including an unknown result type for ValueMetaFactory) is wrapped in this localized KettleException.

Solutions

  1. Check the chained cause to identify the failing attribute (commonly result_type).
  2. Fix or blank the invalid result_type attribute in r_step_attribute, then re-save the step in Spoon.
  3. Run the repository schema upgrade so attribute layout matches the engine version.
  4. Re-create the DB Procedure step to regenerate repository attributes.

Example fix

-- before
UPDATE r_step_attribute SET attribute_value='strng' WHERE attribute_key='result_type';
-- after
UPDATE r_step_attribute SET attribute_value='String' WHERE attribute_key='result_type';
Defensive patterns

Strategy: try-catch

Validate before calling

String rt = rep.getStepAttributeString(id_step, "result_type");
if (rt != null && rt.length() > 0) {
  try { ValueMetaFactory.getIdForValueMeta(rt); }
  catch (Exception e) { throw new IllegalStateException("Unknown result_type: "+rt); }
}

Type guard

boolean isKnownValueType(String name){
  try { ValueMetaFactory.getIdForValueMeta(name); return true; }
  catch (Exception e){ return false; }
}

Try / catch

try { meta.readRep(rep, metaStore, id_step, databases); }
catch (KettleException e) {
  logError("DBProc repository read failed: " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Opening a repository-stored transformation where getStepAttributeString/getStepAttributeBoolean fails, or 'result_type' contains a value ValueMetaFactory cannot map to a value meta id.

Common situations: Repository schema/version mismatch; attributes corrupted or partially deleted; result_type attribute set by a different engine version with a type name no longer recognized.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java:355

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      database = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
      procedure = rep.getStepAttributeString( id_step, "procedure" );

      int nrargs = rep.countNrStepAttributes( id_step, "arg_name" );
      allocate( nrargs );

      for ( int i = 0; i < nrargs; i++ ) {
        argument[i] = rep.getStepAttributeString( id_step, i, "arg_name" );
        argumentDirection[i] = rep.getStepAttributeString( id_step, i, "arg_direction" );
        argumentType[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "arg_type" ) );
      }

      resultName = rep.getStepAttributeString( id_step, "result_name" );
      resultType = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, "result_type" ) );
      autoCommit = rep.getStepAttributeBoolean( id_step, 0, "auto_commit", true );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "DBProcMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", database );
      rep.saveStepAttribute( id_transformation, id_step, "procedure", procedure );

      for ( int i = 0; i < argument.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_name", argument[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_direction", argumentDirection[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_type",
          ValueMetaFactory.getValueMetaName( argumentType[i] ) );
      }

      rep.saveStepAttribute( id_transformation, id_step, "result_name", resultName );
      rep.saveStepAttribute( id_transformation, id_step, "result_type",

View on GitHub (pinned to f3058517a1)