{"record":{"id":"dcd80f564970c725","repo":"pentaho/pentaho-kettle","slug":"database-type-with-plugin-id-couldn-t-be-found","errorCode":null,"errorMessage":"database type with plugin id [] couldn't be found!","messagePattern":"database type with plugin id \\[\\] couldn't be found!","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/DatabaseInterfaceFactory.java","lineNumber":65,"sourceCode":"   * @param databaseTypeDesc the database type to instantiate (a plugin id or description), or blank for a Connection\n   *                        Management\n   *                         Service connection\n   * @return the {@link DatabaseInterface} matching the requested type\n   * @throws KettleDatabaseException when the type could not be found or referenced\n   */\n  public static DatabaseInterface create( String databaseTypeDesc ) throws KettleDatabaseException {\n    if ( isConnectionManagementServiceType( databaseTypeDesc ) ) {\n      return new ConnectionManagementServiceMeta();\n    }\n\n    PluginRegistry registry = PluginRegistry.getInstance();\n    PluginInterface plugin = registry.getPlugin( DatabasePluginType.class, databaseTypeDesc );\n    if ( plugin == null ) {\n      plugin = registry.findPluginWithName( DatabasePluginType.class, databaseTypeDesc );\n    }\n\n    if ( plugin == null ) {\n      throw new KettleDatabaseException( \"database type with plugin id [\"\n        + databaseTypeDesc + \"] couldn't be found!\" );\n    }\n\n    return DatabaseMeta.getDatabaseInterfacesMap().get( plugin.getIds()[ 0 ] );\n  }\n\n  /**\n   * Tells whether the given database type denotes a Connection Management Service connection. This is the single point\n   * of truth for that decision so callers do not need to perform their own {@code instanceof} or string checks.\n   *\n   * @param databaseTypeDesc the database type to inspect\n   * @return {@code true} when the type identifies a Connection Management Service connection\n   */\n  public static boolean isConnectionManagementServiceType( String databaseTypeDesc ) {\n    return StringUtils.isBlank( databaseTypeDesc );\n  }\n}","sourceCodeStart":47,"sourceCodeEnd":82,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/DatabaseInterfaceFactory.java#L47-L82","documentation":"DatabaseInterfaceFactory.createDatabaseMeta(...) resolves a database plugin by id or name from the PluginRegistry and throws KettleDatabaseException when neither lookup matches a registered DatabasePluginType plugin. It means the requested database type has no plugin loaded in this Kettle instance.","triggerScenarios":"Calling DatabaseInterfaceFactory.createDatabaseMeta(logChannel, \"someType\", ...) with a plugin id/name that is absent from the registry — misspelled type, plugin jar not on the classpath, or plugin not yet registered at call time.","commonSituations":"Third-party database plugin (e.g. a vendor JDBC plugin) not installed on the server; type string changed between Pentaho/Kettle versions (renamed plugin ids); running in a minimal/embedded setup where the standard database plugin directory isn't scanned.","solutions":["Confirm the exact plugin id in plugins/<database-type>/plugin.xml and use that string.","Install the missing database plugin jar under the plugins directory (or add it to the classpath) and restart.","List available plugins via PluginRegistry (PluginRegistry.getInstance().getPlugins(DatabasePluginType.class)) to see valid ids.","Check plugin.xml registration — ids and names must match what your code passes."],"exampleFix":"// before\nDatabaseMeta meta = DatabaseInterfaceFactory.createDatabaseMeta(logChannel, \"Orcadb\");\n// after\nList<PluginInterface> plugins = PluginRegistry.getInstance().getPlugins(DatabasePluginType.class);\nPluginInterface p = plugins.stream().filter(x -> \"Oracle\".equals(x.getName())).findFirst()\n  .orElseThrow(() -> new IllegalStateException(\"Install/load the Oracle database plugin\"));\nDatabaseMeta meta = DatabaseInterfaceFactory.createDatabaseMeta(logChannel, p.getIds()[0]);","handlingStrategy":"validation","validationCode":"List<PluginInterface> dbPlugins = PluginRegistry.getInstance().getPlugins(DatabasePluginType.class);\nboolean known = dbPlugins.stream().anyMatch(p -> type.equals(p.getIds()[0]) || type.equals(p.getName()));\nif (!known) throw new IllegalArgumentException(\"Unknown database type/plugin: \" + type);","typeGuard":"boolean isRegisteredDatabaseType(String type) {\n  PluginInterface p = PluginRegistry.getInstance().getPlugin(DatabasePluginType.class, type);\n  return p != null || PluginRegistry.getInstance().findPluginWithName(DatabasePluginType.class, type) != null;\n}","tryCatchPattern":"try {\n  return DatabaseInterfaceFactory.createDatabaseMeta(logChannel, type, null);\n} catch (KettleDatabaseException e) {\n  log.error(\"DB plugin not registered: \" + type + \"; available=\" + pluginIds(), e);\n  throw new ConfigurationException(\"Install database plugin for type \" + type, e);\n}","preventionTips":["Copy plugin ids verbatim from plugin.xml instead of display names.","Ship all required database plugins with your deployment artifact.","On startup, log available DatabasePluginType ids to catch config drift early."],"tags":["plugin","database","registry","configuration"],"backgroundTag":"missing-dependency","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"}