{"record":{"id":"d462174e2776efcb","repo":"pentaho/pentaho-kettle","slug":"databasemeta-error-databaseinterfacenotfound","errorCode":null,"errorMessage":"DatabaseMeta.Error.DatabaseInterfaceNotFound","messagePattern":"DatabaseMeta\\.Error\\.DatabaseInterfaceNotFound","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/DatabaseMeta.java","lineNumber":549,"sourceCode":"   */\n  public void setDatabaseInterface( DatabaseInterface databaseInterface ) {\n    this.databaseInterface = databaseInterface;\n  }\n\n  /**\n   * Search for the right type of DatabaseInterface object and clone it.\n   *\n   * @param databaseType\n   *          the type of DatabaseInterface to look for (description)\n   * @return The requested DatabaseInterface\n   *\n   * @throws KettleDatabaseException\n   *           when the type could not be found or referenced.\n   */\n  public static final DatabaseInterface getDatabaseInterface( String databaseType ) throws KettleDatabaseException {\n    DatabaseInterface di = findDatabaseInterface( databaseType );\n    if ( di == null ) {\n      throw new KettleDatabaseException( BaseMessages.getString(\n        PKG, \"DatabaseMeta.Error.DatabaseInterfaceNotFound\", databaseType ) );\n    }\n    return (DatabaseInterface) di.clone();\n  }\n\n  /**\n   * Search for the right type of DatabaseInterface object and return it.\n   *\n   * @param databaseTypeDesc\n   *          the type of DatabaseInterface to look for (id or description)\n   * @return The requested DatabaseInterface\n   *\n   * @throws KettleDatabaseException\n   *           when the type could not be found or referenced.\n   */\n  private static final DatabaseInterface findDatabaseInterface( String databaseTypeDesc ) throws KettleDatabaseException {\n    PluginRegistry registry = PluginRegistry.getInstance();\n    PluginInterface plugin = registry.getPlugin( DatabasePluginType.class, databaseTypeDesc );","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/DatabaseMeta.java#L531-L567","documentation":"DatabaseMeta.getDatabaseInterface(databaseType) calls findDatabaseInterface and throws KettleDatabaseException with a localized message when no database plugin matches the given type string. The placeholder in the message key is filled with the requested type. Callers receive this whenever the database type cannot be resolved against registered DatabasePluginType plugins.","triggerScenarios":"Calling DatabaseMeta.getDatabaseInterface(\"MyType\") with a type that has no registered plugin; also triggered indirectly by setValues(), setDatabaseType(), DatabaseMeta XML constructors, and getDbInterface() when type lookup fails.","commonSituations":"Repository/kettle.xml/transform metadata references a database type from a plugin that isn't installed on the runtime node; typo in the type attribute; type renamed in a newer Pentaho version.","solutions":["Check the exact database type string against available plugins (getDatabaseInterfaces().keySet()).","Install the missing database plugin into the plugins directory and restart.","Fix the type name in the stored metadata/XML to a built-in type like \"ORACLE\", \"MYSQL\", \"POSTGRESQL\".","If deserializing shared connections from a repository, ensure all plugins used by those connections are deployed cluster-wide."],"exampleFix":"// before\nDatabaseInterface di = DatabaseMeta.getDatabaseInterface(userInputType);\n// after\nDatabaseInterface di = DatabaseMeta.findDatabaseInterface(userInputType);\nif (di == null) { di = DatabaseMeta.getDatabaseInterface(DatabaseMeta.DB_ORACLE); } // fallback + log warning","handlingStrategy":"try-catch","validationCode":"DatabaseInterface probe = DatabaseMeta.findDatabaseInterface(databaseType);\nif (probe == null) {\n  throw new IllegalArgumentException(\"Database type not installed: \" + databaseType);\n}","typeGuard":null,"tryCatchPattern":"try {\n  DatabaseInterface di = DatabaseMeta.getDatabaseInterface(type);\n} catch (KettleDatabaseException e) {\n  // type missing: fall back to GENERIC JDBC and warn\n  DatabaseInterface di = DatabaseMeta.getDatabaseInterface(\"GENERIC\");\n}","preventionTips":["Validate type strings against DatabaseMeta.getDatabaseInterfaces().keySet() before use.","Keep connection metadata type strings in sync across all cluster nodes.","After Pentaho upgrades, audit stored connections for renamed types."],"tags":["database","plugin","lookup","metadata"],"backgroundTag":"entity-not-found","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"}