pentaho/pentaho-kettle · error · KettleException

OraBulkLoaderMeta.GetSQL.NoConnectionDefined

Error message

OraBulkLoaderMeta.GetSQL.NoConnectionDefined

What it means

verifyDatabaseConnection() (called from init) throws this when OraBulkLoaderMeta.getDatabaseMeta() returns null, i.e. the step has no database connection defined. The message is the localized string for key OraBulkLoaderMeta.GetSQL.NoConnectionDefined. The step cannot build a sqlldr command without a target connection.

Solutions

  1. Open the step dialog and select an Oracle database connection, then save the transformation
  2. Programmatically set it: meta.setDatabaseMeta( databaseMeta ) before running
  3. Verify the transformation still contains the referenced connection after imports/merges
  4. Use a shared/central DB connection so deleting one instance does not orphan the step

Example fix

// before
oraBulkLoaderMeta.setDatabaseMeta( null );
// after
oraBulkLoaderMeta.setDatabaseMeta( transMeta.findDatabase( "OracleConn" ) );
Defensive patterns

Strategy: validation

Validate before calling

// guard before executing the transformation
if ( oraBulkLoaderMeta.getDatabaseMeta() == null ) {
  throw new IllegalStateException( "OraBulkLoader step has no database connection defined" );
}

Try / catch

try {
  trans.execute( args );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "NoConnectionDefined" ) ) {
    // assign a connection to the step and retry
  }
}

Prevention

When it happens

Trigger: Running a transformation where the OraBulkLoader step was never given a connection, or the referenced database connection was deleted from the transformation/metadata so meta.databaseMeta is null at init.

Common situations: Copy-pasting steps between transformations without shared DB connections; deleting a connection that the step referenced; programmatically building transformation metadata without calling setDatabaseMeta; failed repository import dropping the connection link.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


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

Appendix: source

Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java:579

        output.writeLine( getInputRowMeta(), r );
      }
      putRow( getInputRowMeta(), r );
      incrementLinesOutput();

    } catch ( KettleException e ) {
      logError( BaseMessages.getString( PKG, "OraBulkLoader.Log.ErrorInStep" ) + e.getMessage() );
      setErrors( 1 );
      stopAll();
      setOutputDone(); // signal end to receiver(s)
      return false;
    }

    return true;
  }

  protected void verifyDatabaseConnection() throws KettleException {
    if ( meta.getDatabaseMeta() == null ) {
      throw new KettleException( BaseMessages.getString( PKG, "OraBulkLoaderMeta.GetSQL.NoConnectionDefined" ) );
    }
  }

  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
    meta = (OraBulkLoaderMeta) smi;
    data = (OraBulkLoaderData) sdi;

    Trans trans = getTrans();
    preview = trans.isPreview();

    if ( super.init( smi, sdi ) ) {
      try {
        verifyDatabaseConnection();
      } catch ( KettleException ex ) {
        logError( ex.getMessage() );
        return false;
      }
      return true;

View on GitHub (pinned to f3058517a1)