pentaho/pentaho-kettle · error · KettleException

UserDefinedJavaClassMeta.Exception.UnableToSaveStepInfo

Error message

UserDefinedJavaClassMeta.Exception.UnableToSaveStepInfo

What it means

Thrown when saving the UDJC step's metadata to a repository fails, wrapped with the key UnableToSaveStepInfo plus the step id, preserving the cause. This occurs inside the step's save path (the SOURCE region shows the catch block following rep.saveStepAttribute calls; the listed raising method is the constructor region but the message belongs to the save flow).

Solutions

  1. Check the wrapped cause: connection vs. permission vs. data-too-long.
  2. Verify repository credentials have write permission on the target transformation.
  3. If the snippet is very large and the repository column limit is hit, shorten code or move it to a jar/class on the classpath.
  4. Retry after restoring repository connectivity; commit any pending transactions.
  5. Save locally as XML first to avoid losing work, then fix repository access.
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify write access before save
if (!repository.getSecurityProvider().isReadOnly()) { /* save */ }

Try / catch

try {
  transMeta.saveRep(repository, metaStore, dirId, transMeta.getObjectId());
} catch (KettleException e) {
  if (e.getMessage().contains("UnableToSaveStepInfo")) {
    // save to local XML instead to avoid data loss
    transMeta.exportXML(...);
  }
}

Prevention

When it happens

Trigger: During saveRep of a transformation containing a UDJC step, rep.saveStepAttribute calls fail — repository connection dropped, transaction error, permission denied, or value exceeds column size.

Common situations: Database repository out of disk/space or max length exceeded by large code snippets; read-only repository credentials; network drop while saving; concurrent modification of the same transformation.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/userdefinedjavaclass/UserDefinedJavaClassMeta.java:684

          + ElementNames.step_tag.name(), stepDefinition.tag );
        rep.saveStepAttribute( id_transformation, id_step, i, ElementNames.target_.name()
          + ElementNames.step_name.name(), stepDefinition.stepMeta != null
          ? stepDefinition.stepMeta.getName() : null );
        rep.saveStepAttribute( id_transformation, id_step, i, ElementNames.target_.name()
          + ElementNames.step_description.name(), stepDefinition.description );
      }

      for ( int i = 0; i < usageParameters.size(); i++ ) {
        UsageParameter usageParameter = usageParameters.get( i );
        rep.saveStepAttribute(
          id_transformation, id_step, i, ElementNames.parameter_tag.name(), usageParameter.tag );
        rep.saveStepAttribute(
          id_transformation, id_step, i, ElementNames.parameter_value.name(), usageParameter.value );
        rep.saveStepAttribute(
          id_transformation, id_step, i, ElementNames.parameter_description.name(), usageParameter.description );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "UserDefinedJavaClassMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

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

    // See if we have input streams leading to this step!
    if ( input.length > 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "UserDefinedJavaClassMeta.CheckResult.ConnectedStepOK2" ), stepinfo );
      remarks.add( cr );
    } else {
      cr =

View on GitHub (pinned to f3058517a1)