pentaho/pentaho-kettle · error · KettleException

CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo

CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo

Error message

CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo

What it means

CubeOutputMeta.readRep loads the Cube Output step's settings from a repository via rep.getStepAttributeString/getStepAttributeBoolean. Any failure is wrapped in a KettleException with 'CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo'. It indicates the step attributes could not be read from the repository storage.

Solutions

  1. Reconnect to the repository and retry opening the transformation.
  2. Check the wrapped cause for the underlying repository/SQL error and address it (locks, permissions, schema).
  3. Verify the repository user has read permission on the transformation.
  4. If the stored step data is corrupted, re-create the Cube Output step or restore the repository from backup.

Example fix

// before: opening with a dead repository reference
TransMeta tm = new TransMeta(rep, transId, metaStore);
// after: ensure the connection is alive first
if (!rep.isConnected()) {
  rep.connect();
}
TransMeta tm = new TransMeta(rep, transId, metaStore);
Defensive patterns

Strategy: try-catch

Validate before calling

if (rep == null || !rep.isConnected()) { throw new KettleException("Repository not connected; cannot read Cube Output step"); }

Try / catch

try { transMeta = new TransMeta(rep, transId, metaStore); } catch (KettleException e) { logError("readRep failed for Cube Output: " + e.getCause().getMessage(), e); rep.disconnect(); rep.connect(); transMeta = new TransMeta(rep, transId, metaStore); }

Prevention

When it happens

Trigger: loadRep -> readRep while the repository's getStepAttribute* calls throw: repository DB disconnected, attribute row locked/corrupted, permission denied reading the step, or repository schema mismatch.

Common situations: Opening a transformation stored in a database repository whose connection dropped; repository user lacking read access; repository upgraded by a newer PDI client so attribute lookups fail; corrupted r_step_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/f275d6995c7c7243. Report an issue: GitHub.

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeoutput/CubeOutputMeta.java:164

    retval.append( "    <file>" ).append( Const.CR );
    retval.append( "      " ).append( XMLHandler.addTagValue( "name", filename ) );
    retval.append( "      " ).append( XMLHandler.addTagValue( "add_to_result_filenames", addToResultFilenames ) );
    retval.append( "      " ).append( XMLHandler.addTagValue( "do_not_open_newfile_init", doNotOpenNewFileInit ) );

    retval.append( "    </file>" ).append( Const.CR );

    return retval.toString();
  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      filename = rep.getStepAttributeString( id_step, "file_name" );
      addToResultFilenames = rep.getStepAttributeBoolean( id_step, "add_to_result_filenames" );
      doNotOpenNewFileInit = rep.getStepAttributeBoolean( id_step, "do_not_open_newfile_init" );

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

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "file_name", filename );
      rep.saveStepAttribute( id_transformation, id_step, "add_to_result_filenames", addToResultFilenames );
      rep.saveStepAttribute( id_transformation, id_step, "do_not_open_newfile_init", doNotOpenNewFileInit );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "CubeOutputMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,

View on GitHub (pinned to f3058517a1)