pentaho/pentaho-kettle · error · KettleException
PentahoReportingOutput.Exception.UnexpectedErrorRenderingRep…
Error message
PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport
What it means
processReport wraps any Throwable raised while rendering the report (loading the prpt file, preparing the output processor, writing the target) into a KettleException with message PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport, including source and target filenames and the output type description. It is the catch-all guard of the reporting output step; the original exception is attached as the cause.
Solutions
- Read the chained 'Caused by' exception — this wrapper only adds context; the cause identifies the real failure
- Confirm the target file extension matches the selected output processor type (PDF->.pdf, Excel->.xls etc.)
- Verify the source .prpt file exists, is readable, and was produced with a compatible Pentaho Reporting version
- Check write permissions on the target directory and that the parent folder exists
Example fix
// before new KettleException( BaseMessages.getString( PKG, "PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport", ... ), e ) // after // keep the wrapper, but log the cause explicitly before throwing to ease debugging: logError( BaseMessages.getString( PKG, "PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport", sourceFilename, targetFilename, outputProcessorType.getDescription() ), e ); throw new KettleException( BaseMessages.getString( PKG, "PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport", sourceFilename, targetFilename, outputProcessorType.getDescription() ), e );
Defensive patterns
Strategy: try-catch
Validate before calling
FileObject src = KettleVFS.getInstance( bowl ).getFileObject( sourceFilename, transMeta );
if ( src == null || !src.exists() || !src.isReadable() ) {
throw new KettleException( "Report source unreadable: " + sourceFilename );
} Try / catch
try {
step.processReport(...);
} catch ( KettleException e ) {
Throwable root = e;
while ( root.getCause() != null ) root = root.getCause();
logError( "Render failed, root cause: " + root, root );
throw e;
} Prevention
- Always match target file extension to the selected output processor type
- Validate .prpt source files exist and load before production runs
- Keep Pentaho Reporting engine and plugin versions aligned
- Pre-create and permission-check the output directory
When it happens
Trigger: Any exception inside the try block of processReport: report file cannot be parsed, PdfReportUtil/OutputProcessor cannot handle the selected ProcessorType, VFS cannot open source or target file, or an error thrown inside the rendering pipeline.
Common situations: Corrupt or wrong-version .prpt report file; target filename with unsupported extension for the chosen processor type (e.g. PDF processor writing to .xlsx); missing write permissions on the output directory; classloader/resource issues in the plugin environment.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- AutoDoc.Exception.UnableToRenderReport
- context.getMessage()
- Field could not be found in the input rows.
- PentahoReportingOutput.Exception.CanNotFindField
- Unable to draw image onto report
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/77eb327bf7720dca.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutput.java:467
if ( context.getStatusType() == StatusType.ERROR ) {
KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( targetFilename, getTransMeta() ).delete();
if ( context.getCause() != null ) {
throw context.getCause();
}
throw new KettleStepException( context.getMessage() );
}
ResultFile resultFile =
new ResultFile(
ResultFile.FILE_TYPE_GENERAL, KettleVFS.getInstance( getTransMeta().getBowl() )
.getFileObject( targetFilename, getTransMeta() ),
getTransMeta().getName(), getStepname() );
resultFile.setComment( "This file was created with a Pentaho Reporting Output step" );
addResultFile( resultFile );
} catch ( Throwable e ) {
throw new KettleException( BaseMessages.getString(
PKG, "PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport", sourceFilename, targetFilename,
outputProcessorType.getDescription() ), e );
}
} finally {
//Restore the original class loader
Thread.currentThread().setContextClassLoader( old );
}
}
private Class<?> findParameterClass( ReportParameterDefinition definition, String parameterName ) {
for ( int i = 0; i < definition.getParameterCount(); i++ ) {
ParameterDefinitionEntry entry = definition.getParameterDefinition( i );
if ( parameterName.equals( entry.getName() ) ) {
return entry.getValueType();
}
}
return null;View on GitHub (pinned to f3058517a1)