pentaho/pentaho-kettle · error · KettleException

XBaseInputMeta.Exception.UnableToSaveMetaDataToRepository

Error message

XBaseInputMeta.Exception.UnableToSaveMetaDataToRepository

What it means

Thrown by XBaseInputMeta.saveRep() when saving step attributes to the Pentaho Repository fails. The message is the localized 'UnableToSaveMetaDataToRepository' string with id_step appended. It wraps any exception from rep.saveStepAttribute calls while persisting the step's configuration.

Solutions

  1. Check the chained cause and repository logs for the underlying save error (SQL exception, connection lost).
  2. Verify the repository user has write permissions on the target directory/transformation.
  3. Reconnect the repository and retry the save.
  4. If using a database repository, check for locks or constraint violations in R_STEP_ATTRIBUTE.
  5. Save the transformation locally (.ktr) as a workaround while repository access is restored.

Example fix

// before: saving with a stale repository connection
repository.save( transMeta, "path", null, true );

// after: ensure connection is alive before saving
if ( !repository.isConnected() ) {
  repository.connect( username, password );
}
repository.save( transMeta, "path", null, true );
Defensive patterns

Strategy: try-catch

Validate before calling

if ( repository == null || !repository.isConnected() || repository.isReadOnly() ) {
  throw new KettleException( "Repository not connected or read-only; cannot save step metadata" );
}

Try / catch

try {
  repository.save( transMeta, path, monitor, overwrite );
} catch ( KettleException e ) {
  logError( "Repository save failed: " + e.getCause(), e );
  // persist a local .ktr copy while diagnosing repository access
}

Prevention

When it happens

Trigger: Saving a transformation containing an XBase Input step to a repository; any rep.saveStepAttribute(...) throws (connection loss, constraint violation, read-only repository) and is wrapped with this message plus the step's ObjectId.

Common situations: Repository database down or connection dropped mid-save, insufficient write permissions on repository tables, read-only repository connection, transaction/lock conflicts with another user saving concurrently.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/e6ad4444b54c9bb1. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java:420

    try {
      rep.saveStepAttribute( id_transformation, id_step, "file_dbf", dbfFileName );
      rep.saveStepAttribute( id_transformation, id_step, "limit", rowLimit );
      rep.saveStepAttribute( id_transformation, id_step, "add_rownr", rowNrAdded );
      rep.saveStepAttribute( id_transformation, id_step, "field_rownr", rowNrField );

      rep.saveStepAttribute( id_transformation, id_step, "include", includeFilename );
      rep.saveStepAttribute( id_transformation, id_step, "include_field", filenameField );
      rep.saveStepAttribute( id_transformation, id_step, "charset_name", charactersetName );

      rep.saveStepAttribute( id_transformation, id_step, "accept_filenames", acceptingFilenames );
      rep.saveStepAttribute( id_transformation, id_step, "accept_field", acceptingField );
      if ( ( acceptingStepName == null ) && ( acceptingStep != null ) ) {
        acceptingStepName = acceptingStep.getName();
      }
      rep.saveStepAttribute( id_transformation, id_step, "accept_stepname", acceptingStepName );

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

  @Override
  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ) {

    CheckResult cr;

    if ( dbfFileName == null ) {
      if ( isAcceptingFilenames() ) {
        if ( Utils.isEmpty( getAcceptingStepName() ) ) {
          cr =
            new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(
              PKG, "XBaseInput.Log.Error.InvalidAcceptingStepName" ), stepMeta );

View on GitHub (pinned to f3058517a1)