{"record":{"id":"f7d1cc82bdb34cc7","repo":"pentaho/pentaho-kettle","slug":"database-type-with-plugin-id-couldn-t-be-found-databasemeta","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/DatabaseMeta.java","lineNumber":573,"sourceCode":"  /**\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 );\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 getDatabaseInterfacesMap().get( plugin.getIds()[0] );\n  }\n\n  /**\n   * Returns the database ID of this database connection if a repository was used before.\n   *\n   * @return the ID of the db connection.\n   */\n  @Override\n  public ObjectId getObjectId() {\n    return databaseInterface.getObjectId();\n  }\n\n  @Override\n  public void setObjectId( ObjectId id ) {","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/DatabaseMeta.java#L555-L591","documentation":"DatabaseMeta.findDatabaseInterface(databaseTypeDesc) looks up a plugin by id then by name in the PluginRegistry and throws KettleDatabaseException if both lookups return null. Unlike getDatabaseInterface (which returns a message-key based error), this throws a literal message naming the unresolved plugin id. The database type is simply not registered in this JVM.","triggerScenarios":"Any code path that calls findDatabaseInterface with an unknown type string — e.g. DatabaseMeta.di (internal type resolution) when loading connections from XML or repositories with unregistered plugin types.","commonSituations":"Opening a kettle.properties/repository connection defined against a custom vendor plugin absent at runtime; case-sensitivity mismatch (\"postgresql\" vs \"POSTGRESQL\"); plugin id changed after a Pentaho upgrade.","solutions":["Correct the type string to match a registered plugin id or name exactly (id lookup is tried first, then name).","Deploy the referenced database plugin jar to plugins/ and restart the JVM.","After upgrading Pentaho, remap deprecated/renamed plugin ids in stored connection metadata.","Call PluginRegistry.getPlugins(DatabasePluginType.class) first to validate the type exists."],"exampleFix":"// before\nDatabaseInterface di = DatabaseMeta.findDatabaseInterface(typeFromXml);\n// after\nif (DatabaseMeta.findDatabaseInterface(typeFromXml) == null && !isPluginRegistered(typeFromXml)) {\n  log.logBasic(\"Database type \" + typeFromXml + \" not available, defaulting to GENERIC\");\n}\nDatabaseInterface di = DatabaseMeta.findDatabaseInterface(typeFromXml != null ? typeFromXml : \"GENERIC\");","handlingStrategy":"type-guard","validationCode":"if (type == null || (!idExists(type) && !nameExists(type))) {\n  log.warn(\"Database type unresolved: \" + type);\n  type = \"GENERIC\";\n}","typeGuard":"boolean resolvableType(String t) {\n  PluginRegistry r = PluginRegistry.getInstance();\n  return t != null && (r.getPlugin(DatabasePluginType.class, t) != null\n    || r.findPluginWithName(DatabasePluginType.class, t) != null);\n}","tryCatchPattern":"try {\n  DatabaseInterface di = DatabaseMeta.findDatabaseInterface(t);\n} catch (KettleDatabaseException e) {\n  throw new UnavailableDatabasePluginException(t, e); // domain-specific handling\n}","preventionTips":["Match plugin ids case-sensitively; names are only a fallback lookup.","Deploy vendor plugins before loading shared repository connections.","Test connection loading in a clean environment mirroring production."],"tags":["plugin","database","registry","lookup"],"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"}