{"record":{"id":"9f7d5b0af3d629ce","repo":"pentaho/pentaho-kettle","slug":"error-creating-class-for","errorCode":null,"errorMessage":"Error creating class for: ","messagePattern":"Error creating class for: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/core/database/wizard/CreateDatabaseWizardPage1.java","lineNumber":149,"sourceCode":"    props.setLook( wDBType );\n\n    PluginRegistry registry = PluginRegistry.getInstance();\n\n    java.util.List<PluginInterface> plugins = registry.getPlugins( DatabasePluginType.class );\n    Collections.sort( plugins, new Comparator<PluginInterface>() {\n      @Override\n      public int compare( PluginInterface o1, PluginInterface o2 ) {\n        return o1.getName().toUpperCase().compareTo( o2.getName().toUpperCase() );\n      }\n    } );\n\n    for ( PluginInterface plugin : plugins ) {\n      try {\n        wDBType.add( plugin.getName() );\n        wDBIDtoNameMap.put( plugin.getIds()[0], plugin.getName() );\n\n      } catch ( Exception e ) {\n        throw new RuntimeException( \"Error creating class for: \" + plugin, e );\n      }\n    }\n\n    // Select a default: the first\n    /*\n     * if (databaseMeta.getDatabaseType() <= 0) { wDBType.select(0); } else {\n     */\n    int idx = wDBType.indexOf( wDBIDtoNameMap.get( databaseMeta.getPluginId() ) );\n    if ( idx >= 0 ) {\n      wDBType.select( idx );\n    } else {\n      wDBType.select( 0 );\n    }\n\n    // }\n\n    fdDBType = new FormData();\n    fdDBType.top = new FormAttachment( wName, margin );","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/core/database/wizard/CreateDatabaseWizardPage1.java#L131-L167","documentation":"CreateDatabaseWizardPage1 populates the database-type list box from registered database plugins. If reading a plugin's name/ids throws, it wraps the failure in a RuntimeException 'Error creating class for: ' + plugin, aborting wizard page creation.","triggerScenarios":"Opening the 'Create database' wizard when the plugin registry contains a database plugin whose class cannot be loaded/instantiated (corrupt or incompatible plugin jar, duplicate plugin id).","commonSituations":"Manually installed or outdated database plugin jars in libext/plugins; plugin built against a different Kettle version; broken plugin.xml descriptor.","solutions":["Identify the failing plugin from the message and remove/repair its jar in the plugins directory.","Reinstall the correct plugin version matching your Pentaho/Kettle release.","Clear stale plugin registrations and restart Spoon so the plugin registry rebuilds.","Update to a plugin build compatible with the current DatabasePluginType."],"exampleFix":"// before\nfor ( PluginInterface plugin : plugins ) {\n  wDBType.add( plugin.getName() );\n}\n// after\nfor ( PluginInterface plugin : plugins ) {\n  try {\n    wDBType.add( plugin.getName() );\n  } catch ( Throwable t ) {\n    log.logError( \"Skipping unloadable database plugin: \" + plugin.getIds()[0], t );\n  }\n}","handlingStrategy":"fallback","validationCode":"// verify each plugin loads before adding to the wizard list\nfor ( PluginInterface plugin : plugins ) {\n  try {\n    plugin.getName();\n  } catch ( Throwable t ) {\n    log.logError( \"Unusable plugin: \" + plugin.getIds()[0], t );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  new CreateDatabaseWizard( shell, ... ).open();\n} catch ( RuntimeException e ) {\n  if ( e.getMessage().startsWith( \"Error creating class for: \" ) ) {\n    showPluginRepairHint( e.getMessage() );\n  }\n}","preventionTips":["Keep database plugin jars matched to the Kettle/Pentaho version.","Remove duplicate or corrupt plugin jars from the plugins directory.","Validate plugin.xml descriptors after manual plugin installs."],"tags":["plugins","class-not-found","wizard","database"],"backgroundTag":"class-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"}