pentaho/pentaho-kettle · error · KettleException

No connection specified

Error message

No connection specified

What it means

The sqlldr command line must end with a valid Oracle connect string (user/password@dbname). If meta.getDatabaseMeta() is null — no database connection is selected on the step — createCommandLine cannot append connection info and throws this KettleException.

Solutions

  1. Open the step dialog and select a valid Oracle database connection in the Connection field.
  2. Define the connection in the transformation's connections list if it is missing (host, port, SID/service, credentials).
  3. If editing the ktr manually, add/relink the <connection> element and the step's <connection> reference.
  4. Ensure the connection is a DatabaseMeta of an Oracle type compatible with sqlldr.

Example fix

// before: step meta has no connection
<connection/>
// after
<connection>OracleProd</connection>
<!-- and in transformation: -->
<connection><name>OracleProd</name><type>ORACLE</type><database>ORCL</database>...</connection>
Defensive patterns

Strategy: validation

Validate before calling

// Java: confirm the step has a database connection before execution
if (meta.getDatabaseMeta() == null) {
  throw new IllegalArgumentException(
    "Oracle Bulk Loader step requires a database connection (Connection field).",
  );
}

Try / catch

try {
  trans.execute(null);
} catch (KettleException e) {
  if (String.valueOf(e.getMessage()).contains("No connection specified")) {
    // open step dialog and select/define the Oracle connection
  }
}

Prevention

When it happens

Trigger: meta.getDatabaseMeta() == null during createCommandLine called from execute — the step's connection dropdown was never set (or the referenced connection was deleted from the transformation).

Common situations: Step copied into a new transformation whose connection list lacks the original connection name; connection deleted after the step was configured; step configured programmatically without setDatabaseMeta; XML merge lost the connection element.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

      String user = Const.NVL( dm.getUsername(), "" );
      String pass =
        Const.NVL( Encr.decryptPasswordOptionallyEncrypted( environmentSubstitute( dm.getPassword() ) ), "" );
      if ( !password ) {
        pass = "******";
      }
      String dns = Const.NVL( dm.getDatabaseName(), "" );
      sb.append( " userid=" ).append( environmentSubstitute( user ) ).append( "/" ).append(
        environmentSubstitute( pass ) ).append( "@" );

      String overrideName = meta.getDbNameOverride();
      if ( Utils.isEmpty( Const.rtrim( overrideName ) ) ) {
        sb.append( environmentSubstitute( dns ) );
      } else {
        // if the database name override is filled in, do that one.
        sb.append( environmentSubstitute( overrideName ) );
      }
    } else {
      throw new KettleException( "No connection specified" );
    }

    if ( meta.isDirectPath() ) {
      sb.append( " DIRECT=TRUE" );

      if ( getStepMeta().getCopies() > 1 || meta.isParallel() ) {
        sb.append( " PARALLEL=TRUE" );
      }
    }

    return sb.toString();
  }

  public void checkExitVal( int exitVal ) throws KettleException {
    if ( exitVal == EX_SUCC ) {
      return;
    }

View on GitHub (pinned to f3058517a1)