{"record":{"id":"9073524ba6eccbab","repo":"pentaho/pentaho-kettle","slug":"orabulkloadermeta-getsql-noconnectiondefined","errorCode":null,"errorMessage":"OraBulkLoaderMeta.GetSQL.NoConnectionDefined","messagePattern":"OraBulkLoaderMeta\\.GetSQL\\.NoConnectionDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java","lineNumber":579,"sourceCode":"        output.writeLine( getInputRowMeta(), r );\n      }\n      putRow( getInputRowMeta(), r );\n      incrementLinesOutput();\n\n    } catch ( KettleException e ) {\n      logError( BaseMessages.getString( PKG, \"OraBulkLoader.Log.ErrorInStep\" ) + e.getMessage() );\n      setErrors( 1 );\n      stopAll();\n      setOutputDone(); // signal end to receiver(s)\n      return false;\n    }\n\n    return true;\n  }\n\n  protected void verifyDatabaseConnection() throws KettleException {\n    if ( meta.getDatabaseMeta() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"OraBulkLoaderMeta.GetSQL.NoConnectionDefined\" ) );\n    }\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (OraBulkLoaderMeta) smi;\n    data = (OraBulkLoaderData) sdi;\n\n    Trans trans = getTrans();\n    preview = trans.isPreview();\n\n    if ( super.init( smi, sdi ) ) {\n      try {\n        verifyDatabaseConnection();\n      } catch ( KettleException ex ) {\n        logError( ex.getMessage() );\n        return false;\n      }\n      return true;","sourceCodeStart":561,"sourceCodeEnd":597,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java#L561-L597","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the step dialog and select an Oracle database connection, then save the transformation","Programmatically set it: meta.setDatabaseMeta( databaseMeta ) before running","Verify the transformation still contains the referenced connection after imports/merges","Use a shared/central DB connection so deleting one instance does not orphan the step"],"exampleFix":"// before\noraBulkLoaderMeta.setDatabaseMeta( null );\n// after\noraBulkLoaderMeta.setDatabaseMeta( transMeta.findDatabase( \"OracleConn\" ) );","handlingStrategy":"validation","validationCode":"// guard before executing the transformation\nif ( oraBulkLoaderMeta.getDatabaseMeta() == null ) {\n  throw new IllegalStateException( \"OraBulkLoader step has no database connection defined\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute( args );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"NoConnectionDefined\" ) ) {\n    // assign a connection to the step and retry\n  }\n}","preventionTips":["Always assign a DB connection in the step dialog before saving","Use shared connection metadata to avoid orphaned references","After imports/merges, verify each OraBulkLoader step still references an existing connection"],"tags":["oracle","configuration","missing-connection","metadata"],"backgroundTag":"missing-required-config","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}