pentaho/pentaho-kettle · error · IllegalStateException
Cannot load dialog due to error in initialization.
Error message
Cannot load dialog due to error in initialization.
What it means
AbstractPreviewRowsXulDialog's constructor calls initializeXul() to load and bind its XUL document; any failure (missing XUL file, XulParseException, binding error) is logged and rethrown as an IllegalStateException. The dialog cannot be displayed at all when this fires.
Solutions
- Inspect the logged 'Error initializing dialog...' cause to find the underlying XUL failure
- Reinstall/repair the PDI UI resources so the XUL document exists on the classpath
- Verify Kettle plugin/UI versions are consistent (no mixed jars)
- Check the classloader/thread context when embedding Kettle in another app
Example fix
// before: constructing dialog in a broken environment throws IllegalStateException
new PreviewRowsXulDialog(shell, variables, true, rows, "Preview");
// after: guard construction and surface cause
try {
new PreviewRowsXulDialog(shell, variables, true, rows, "Preview");
} catch (IllegalStateException e) {
log.logError("Preview dialog unavailable", e.getCause());
} Defensive patterns
Strategy: try-catch
Validate before calling
// verify XUL resource exists before constructing the dialog
boolean xulAvailable = Thread.currentThread().getContextClassLoader()
.getResource("org/pentaho/di/ui/xul/common/preview/previewRows.xul") != null; // adjust per dialog document Try / catch
try {
PreviewRowsXulDialog dlg = new PreviewRowsXulDialog(shell, variables, true, rows, title);
dlg.init();
} catch (IllegalStateException e) {
log.logError("Preview dialog initialization failed", e.getCause());
// fall back to a plain SWT message box
} Prevention
- Keep the full PDI UI distribution intact (XUL files, jars)
- Avoid mixing Kettle/plugin jar versions in the classpath
- Always log and inspect the chained cause — the IllegalStateException wraps the original XUL error
- When embedding Kettle, ensure the correct context classloader is set on the UI thread
When it happens
Trigger: Constructing a preview dialog (e.g. PreviewRowsXulDialog) when initializeXul() fails — typically because the XUL document resource cannot be found/loaded, a required XulSpoonSettings/JarfileLoader is unavailable, or getElementById wiring throws.
Common situations: Corrupted or incomplete PDI installation missing UI XUL resources; classloader issues when embedding Kettle; Kettle version mismatch where XUL files moved; running outside Spoon without required SWT/XUL environment.
Related errors
- A connection of type PALO is expected
- A connection of type PALO is expected
- A deadlock was detected between steps
- A server socket allocation always has to accompanied by a…
- A server socket allocation always has to accompanied by a…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7679c11cd52c4dfc.
Report an issue: GitHub.
Appendix: source
Thrown at ui/src/main/java/org/pentaho/di/ui/xul/common/preview/AbstractPreviewRowsXulDialog.java:85
private int maxRows;
private XulProgressmeter progressMeter;
public AbstractPreviewRowsXulDialog( Object parent, BaseStepMeta stepMeta, int maxRows ) {
this.xulFile = "org/pentaho/di/ui/xul/common/preview/xul/preview_rows.xul";
this.parent = parent;
this.meta = stepMeta;
this.maxRows = maxRows;
log = new LogChannel( "Row Preview" );
try {
initializeXul();
progressMeter = (XulProgressmeter) document.getElementById( "progress" );
} catch ( Exception e ) {
log.logError( "Error initializing dialog...", e );
throw new IllegalStateException( "Cannot load dialog due to error in initialization.", e );
}
}
public void init() {
final List<String> columns = new ArrayList<String>();
final List<Object[]> data = new ArrayList<Object[]>();
previewStep( data, columns );
createPreviewRows( data, columns );
}
/**
* TODO: This method should not be necessary once a XulTable can take bindings for creating xulcolumn definitions at
* runtime and mapping the data to the columns.
*
* @param dataView on GitHub (pinned to f3058517a1)