{"record":{"id":"40e3592167140996","repo":"pentaho/pentaho-kettle","slug":"infobrightloadermeta-getsql-noconnectiondefined","errorCode":"InfobrightLoaderMeta.GetSQL.NoConnectionDefined","errorMessage":"InfobrightLoaderMeta.GetSQL.NoConnectionDefined","messagePattern":"InfobrightLoaderMeta\\.GetSQL\\.NoConnectionDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/infobright-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/infobrightoutput/InfobrightLoader.java","lineNumber":117,"sourceCode":"          logBasic( \"linenr \" + getLinesRead() );\n        }\n      }\n    } catch ( Exception e ) {\n      logError( \"Because of an error, this step can't continue: \" + e.getMessage() );\n      logError( Const.getStackTracker( e ) );\n      setErrors( 1 );\n      stopAll();\n      setOutputDone(); // signal end to receiver(s)\n      closePipe();\n      return false;\n    }\n    return true;\n  }\n\n  protected void verifyDatabaseConnection() throws KettleException {\n    // Confirming Database Connection is defined.\n    if ( meta.getDatabaseMeta() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"InfobrightLoaderMeta.GetSQL.NoConnectionDefined\" ) );\n    }\n  }\n\n  /**\n   * {@inheritDoc}\n   *\n   * @see org.pentaho.di.trans.step.BaseStep#init(org.pentaho.di.trans.step.StepMetaInterface,\n   *      org.pentaho.di.trans.step.StepDataInterface)\n   */\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    boolean res = false;\n    meta = (InfobrightLoaderMeta) smi;\n    data = (InfobrightLoaderData) sdi;\n\n    if ( super.init( smi, sdi ) ) {\n      try {\n        verifyDatabaseConnection();\n        data.databaseSetup( meta, this );","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/infobright-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/infobrightoutput/InfobrightLoader.java#L99-L135","documentation":"InfobrightLoader.verifyDatabaseConnection() throws this KettleException when the step's database meta (meta.getDatabaseMeta()) is null, meaning no Infobright/MySQL database connection is associated with the step. The message is an i18n key (InfobrightLoaderMeta.GetSQL.NoConnectionDefined) resolved via BaseMessages against the step's messages package.","triggerScenarios":"init() calls verifyDatabaseConnection() during step initialization and the step was saved without a database connection, or the connection reference failed to deserialize (connection deleted from the transformation).","commonSituations":"Developer created the step programmatically without calling setDatabaseMeta(); the shared DB connection was deleted so the metadata reference became null; transformation XML copied between projects lost the connection.","solutions":["Open the Infobright bulk loader step dialog and select/define the database connection","Re-add the missing database connection to the transformation so the reference resolves","If building metadata in code, call InfobrightLoaderMeta.setDatabaseMeta(...) before init","Check the ktr XML for the step's <connection> element to confirm the connection name is present"],"exampleFix":"// before\nInfobrightLoaderMeta meta = new InfobrightLoaderMeta();\n// after\nInfobrightLoaderMeta meta = new InfobrightLoaderMeta();\nmeta.setDatabaseMeta(DatabaseMeta.findDatabase(transMeta.getDatabases(), \"Infobright\"));","handlingStrategy":"validation","validationCode":"if (meta.getDatabaseMeta() == null) { throw new IllegalStateException(\"Infobright loader step requires a database connection\"); }","typeGuard":null,"tryCatchPattern":"try { step.init(...); } catch (KettleException e) { if (e.getMessage().contains(\"NoConnectionDefined\")) { /* attach DatabaseMeta and re-init */ } }","preventionTips":["Always assign a database connection in the step dialog before saving","When deleting shared connections, first check which steps reference them","In code, setDatabaseMeta() before init/execute","Validate transformations with a metadata lint before production runs"],"tags":["kettle","database","configuration","infobright"],"backgroundTag":"missing-required-config-field","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"}