{"record":{"id":"43c36d8055fc48cd","repo":"pentaho/pentaho-kettle","slug":"luciddbstreamingloadermeta-exception-connectionnotdefined","errorCode":null,"errorMessage":"LucidDBStreamingLoaderMeta.Exception.ConnectionNotDefined","messagePattern":"LucidDBStreamingLoaderMeta\\.Exception\\.ConnectionNotDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/lucid-db-streaming-loader/core/src/main/java/org/pentaho/di/trans/steps/luciddbstreamingloader/LucidDBStreamingLoaderMeta.java","lineNumber":852,"sourceCode":"          // Check if this table exists...\n          if ( db.checkTableExists( schemaTable ) ) {\n            return db.getTableFields( schemaTable );\n          } else {\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"LucidDBStreamingLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"LucidDBStreamingLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"LucidDBStreamingLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"LucidDBStreamingLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;\n  }\n\n  /**\n   * @param schemaName\n   *          the schemaName to set\n   */\n  public void setSchemaName( String schemaName ) {\n    this.schemaName = schemaName;","sourceCodeStart":834,"sourceCodeEnd":870,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/lucid-db-streaming-loader/core/src/main/java/org/pentaho/di/trans/steps/luciddbstreamingloader/LucidDBStreamingLoaderMeta.java#L834-L870","documentation":"At the end of the table-field lookup, if the step's databaseMeta is null (no database connection defined for this step) the meta throws KettleException with the localized 'ConnectionNotDefined' message before even attempting to connect.","triggerScenarios":"getFields()/SQL generation is invoked on a LucidDB Streaming Loader step whose 'Connection' field is empty — e.g. the connection referenced in the XML no longer exists in this environment.","commonSituations":"Transformation exported/imported without its shared connection; the shared DB connection was deleted; step dialog saved without selecting a connection; repository import missing shared objects.","solutions":["Open the step dialog and select a database connection; save the transformation.","Re-create/import the missing shared database connection so the reference resolves.","When importing from repository/XML, choose to import shared objects (connections).","Add a metadata check before execution to fail fast on null connection."],"exampleFix":"// before (step XML)\n<connection></connection>\n// after\n<connection>LUCIDDB_PROD</connection>","handlingStrategy":"validation","validationCode":"if (meta.getDatabaseMeta() == null) {\n  throw new KettleException(\"LucidDB Streaming Loader: no database connection defined; select one in the step dialog\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.getFields(...);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ConnectionNotDefined\")) {\n    logError(\"Attach a database connection to the step\");\n  }\n  throw e;\n}","preventionTips":["Select a connection in every loader step; never save with it blank.","When exporting/importing transformations, include shared connections.","After deleting a shared connection, audit steps that referenced it.","Run metadata validation on the transformation before scheduling."],"tags":["kettle","configuration","database","connection"],"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"}