{"record":{"id":"3931857270b831c1","repo":"pentaho/pentaho-kettle","slug":"upgraderepositorydialog-error-createupdate","errorCode":null,"errorMessage":"UpgradeRepositoryDialog.Error.CreateUpdate","messagePattern":"UpgradeRepositoryDialog\\.Error\\.CreateUpdate","errorType":"exception","errorClass":"InvocationTargetException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/repository/dialog/UpgradeRepositoryProgressDialog.java","lineNumber":98,"sourceCode":"        box.setMessage( BaseMessages.getString( PKG, \"UpgradeRepositoryDialog.DryRunQuestion.Message\" ) );\n        box.setText( BaseMessages.getString( PKG, \"UpgradeRepositoryDialog.DryRunQuestion.Title\" ) );\n        int answer = box.open();\n\n        try {\n          if ( answer == SWT.YES ) {\n            // First do a dry-run\n            //\n            dryRun = true;\n            rep.createRepositorySchema( new ProgressMonitorAdapter( monitor ), upgrade, generatedStatements, true );\n          } else {\n            rep\n              .createRepositorySchema(\n                new ProgressMonitorAdapter( monitor ), upgrade, generatedStatements, false );\n          }\n\n        } catch ( KettleException e ) {\n          log.logError( toString(), Const.getStackTracker( e ) );\n          throw new InvocationTargetException( e, BaseMessages.getString(\n            PKG, \"UpgradeRepositoryDialog.Error.CreateUpdate\", e.getMessage() ) );\n        }\n      }\n    };\n\n    try {\n      ProgressMonitorDialog pmd = new ProgressMonitorDialog( shell );\n      pmd.run( false, false, op );\n    } catch ( InvocationTargetException e ) {\n      log.logError( UpgradeRepositoryProgressDialog.class.toString(), \"Error creating/updating repository: \"\n        + e.toString() );\n      log.logError( toString(), Const.getStackTracker( e ) );\n      showErrorDialog( e );\n\n      retval = false;\n    } catch ( InterruptedException e ) {\n      log.logError( UpgradeRepositoryProgressDialog.class.toString(), \"Error creating/updating repository: \"\n        + e.toString() );","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/repository/dialog/UpgradeRepositoryProgressDialog.java#L80-L116","documentation":"In UpgradeRepositoryProgressDialog's run(), a KettleException while generating/creating the repository schema (upgrade SQL statements) is wrapped in an InvocationTargetException with 'UpgradeRepositoryDialog.Error.CreateUpdate' and the exception message. It means the repository upgrade DDL generation or execution failed.","triggerScenarios":"Running the repository upgrade wizard when rep.createRepositorySchema(...) throws — database connection failure during upgrade, insufficient DB privileges to create/alter tables, schema already partially upgraded, or unsupported database version.","commonSituations":"Upgrading an old Kettle repository against a database where the user lacks DDL rights; interrupted previous upgrade leaving inconsistent schema; DB driver/network failure mid-upgrade.","solutions":["Read the logged stack tracker and e.getMessage() in the dialog for the root database error","Connect as a DB user with CREATE/ALTER privileges on the repository schema","Back up the repository schema and re-run the upgrade after fixing the connection","Manually inspect/apply generated statements to repair a partially upgraded schema"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// ensure DDL privileges before upgrade\ntry (Connection c = ds.getConnection()) { c.createStatement().execute(\"SELECT 1\"); } // plus verify CREATE TABLE privilege with DBA","typeGuard":null,"tryCatchPattern":"try { runUpgradeProgressDialog(...); } catch (InvocationTargetException ite) { Throwable root = ite; while (root.getCause() != null) root = root.getCause(); log.error(\"Upgrade failed: \" + root.getMessage(), root); showError(\"Repository upgrade failed, see log\"); }","preventionTips":["Back up the repository database before upgrading","Run the upgrade with a DB account that has CREATE/ALTER privileges","Complete interrupted upgrades before retrying to avoid partial schema state","Check the log for the full stack tracker (Const.getStackTracker) written at upgrade time"],"tags":["kettle","repository","upgrade","database","ddl"],"backgroundTag":"database-write-failed","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"}