{"record":{"id":"5b4ec2d33e294114","repo":"pentaho/pentaho-kettle","slug":"gpbulkloadermeta-exception-connectionnotdefined","errorCode":null,"errorMessage":"GPBulkLoaderMeta.Exception.ConnectionNotDefined","messagePattern":"GPBulkLoaderMeta\\.Exception\\.ConnectionNotDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java","lineNumber":683,"sourceCode":"          String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );\n\n          // Check if this table exists...\n          if ( db.checkTableExists( schemaTable ) ) {\n            return db.getTableFields( schemaTable );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException(\n          BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  @Override\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":665,"sourceCodeEnd":701,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java#L665-L701","documentation":"Thrown by GPBulkLoaderMeta.getRequiredFields when the step has no database connection defined (databaseMeta == null). The method short-circuits before opening a Database and raises the localized ConnectionNotDefined KettleException.","triggerScenarios":"Calling getRequiredFields on a step whose connection field was never set, or whose connection reference was lost (e.g. transformation copied between repositories where the connection does not exist).","commonSituations":"Imported transformation XML without shared connections; connection deleted from the repository so the step reference is dangling; new step not fully configured.","solutions":["Select or create a database connection in the GP Bulk Loader step dialog","Verify the referenced connection still exists in the repository/shared connections","Re-save the transformation after binding the connection"],"exampleFix":"// before (step settings)\nConnection: (empty)  -> KettleException ConnectionNotDefined\n// after\nConnection: GP_DB (PostgreSQL/Greenplum connection selected in dialog)","handlingStrategy":"validation","validationCode":"// check before using the step\nif ( meta.getDatabaseMeta() == null ) {\n  throw new IllegalStateException( \"GP Bulk Loader has no connection defined\" );\n}","typeGuard":"boolean hasConnection = meta.getDatabaseMeta() != null;","tryCatchPattern":"try { meta.getRequiredFields( transMeta ); } catch ( KettleException e ) { /* bind a connection, retry */ }","preventionTips":["Configure the connection in every step, never copy XML without shared connections","Verify connection references after importing transformations between repositories","Use shared/central connection definitions to reduce dangling references"],"tags":["kettle","database","configuration","missing-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"}