pentaho/pentaho-kettle · error · InvocationTargetException
GetJobSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception
GetJobSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception
Error message
GetJobSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception
What it means
GetJobSQLProgressDialog runs jobMeta.getSQLStatements(repository, monitor) on a background thread to generate the SQL needed by a job. Any KettleException is wrapped in an InvocationTargetException with localized message GetJobSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception (the wrapped e.getMessage() is substituted).
Solutions
- Inspect the wrapped KettleException message to find which job entry failed.
- Verify every job entry's referenced transformation/job exists and is resolvable.
- Reconnect to the repository and retry SQL generation.
- Fix database metadata entries referenced by job entries.
Example fix
// before
JobEntryTrans entry = ...; entry.setFilename("missing.ktr");
// after
entry.setFilename("/valid/path/exists.ktr"); // reference must exist before SQL generation Defensive patterns
Strategy: validation
Validate before calling
for (JobEntryCopy copy : jobMeta.getJobEntries()) {
JobEntryInterface je = copy.getEntry();
if (je instanceof JobEntryTrans) {
String f = ((JobEntryTrans) je).getFilename();
if (f != null && !new File(f).exists()) {
throw new IllegalStateException("Job entry references missing transformation: " + f);
}
}
} Try / catch
try {
new GetJobSQLProgressDialog(shell, jobMeta, repository).open();
} catch (Exception e) {
log.error("Job SQL generation failed: ", e);
} Prevention
- Verify referenced transformations/files exist before SQL generation.
- Keep repository sessions alive during long edits.
- Validate database metadata on job entries.
When it happens
Trigger: Opening the job SQL generation dialog when a job entry or the job metadata cannot produce SQL statements: a job entry referencing a missing transformation/file, or an invalid/null repository handle.
Common situations: Job entries pointing to transformations or files that no longer exist; repository connection lost; invalid database metadata used by job entries.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- GetSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception
- AnalyseImpactProgressDialog.RuntimeError.UnableToAnalyzeImpact.Exception
- AnalyseImpactProgressDialog.RuntimeError.ErrorCheckingTransformation.Exception
- ExecuteJobServlet.Error.JobNotFoundInDirectory
- Spoon.RipDB.Exception.ErrorGettingSQLFromTransformation
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/e965acdd34a3c42e.
Report an issue: GitHub.
Appendix: source
Thrown at ui/src/main/java/org/pentaho/di/ui/spoon/dialog/GetJobSQLProgressDialog.java:67
public GetJobSQLProgressDialog( Shell shell, JobMeta jobMeta, Repository repository ) {
this.shell = shell;
this.jobMeta = jobMeta;
this.repository = repository;
}
public List<SQLStatement> open() {
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException {
// This is running in a new process: copy some KettleVariables info
// LocalVariables.getInstance().createKettleVariables(Thread.currentThread(), kettleVariables.getLocalThread(),
// true);
// --> don't set variables if not running in different thread --> pmd.run(true,true, op);
try {
stats = jobMeta.getSQLStatements( repository, new ProgressMonitorAdapter( monitor ) );
} catch ( KettleException e ) {
throw new InvocationTargetException( e, BaseMessages.getString(
PKG, "GetJobSQLProgressDialog.RuntimeError.UnableToGenerateSQL.Exception", e.getMessage() ) ); // Error
// generating
// SQL for
// job:
// \n{0}
}
}
};
try {
ProgressMonitorDialog pmd = new ProgressMonitorDialog( shell );
pmd.run( false, false, op );
} catch ( InvocationTargetException e ) {
new ErrorDialog( shell, BaseMessages.getString( PKG, "GetJobSQLProgressDialog.Dialog.UnableToGenerateSQL.Title" ),
BaseMessages.getString( PKG, "GetJobSQLProgressDialog.Dialog.UnableToGenerateSQL.Message" ), e );
stats = null;
} catch ( InterruptedException e ) {
new ErrorDialog( shell, BaseMessages.getString( PKG, "GetJobSQLProgressDialog.Dialog.UnableToGenerateSQL.Title" ),View on GitHub (pinned to f3058517a1)