pentaho/pentaho-kettle · error · KettleException
GPLoadDataOutput.Exception" + e.getMessage()
Error message
GPLoadDataOutput.Exception" + e.getMessage()
What it means
open() wraps stream construction (FileOutputStream, OutputStreamWriter, PrintWriter) in a try/catch and rethrows any IOException as a KettleException with prefix 'GPLoadDataOutput.Exception'. This means the data file could not be opened/written — typically path or permission problems, not metadata problems.
Solutions
- Verify the directory in the data file path exists and is writable by the PDI user (mkdir/chmod)
- Validate the configured encoding is a supported charset name (use Charset.isSupported) or switch to UTF-8
- Check available disk space on the target filesystem
- Inspect the wrapped cause (e.getCause()) for the precise IOException
Example fix
// before
File f = new File("/nonexistent/dir/data.txt");
// after
File dir = new File("/data/load");
dir.mkdirs();
File f = new File(dir, "data.txt"); Defensive patterns
Strategy: try-catch
Validate before calling
File dir = new File(dataFile).getParentFile();
if (dir == null || !dir.isDirectory() || !dir.canWrite()) throw new IllegalStateException("Cannot write to dir: " + dir);
Charset c = Charset.isSupported(encoding) ? Charset.forName(encoding) : StandardCharsets.UTF_8; Try / catch
try { dataOutput.open(); } catch (KettleException e) {
Throwable cause = e.getCause();
if (cause instanceof FileNotFoundException) { /* fix path/permissions */ }
else if (cause instanceof java.nio.charset.UnsupportedCharsetException || cause instanceof UnsupportedEncodingException) { /* fix encoding */ }
throw e;
} Prevention
- Pre-create and chmod the data-file directory for the PDI service user
- Use standard charset names like UTF-8, never locale aliases
- Monitor disk space on the volume holding load files
- Always read e.getCause() — this error wraps a specific IOException
When it happens
Trigger: new FileOutputStream(dataFile, false) throws FileNotFoundException (directory does not exist, no write permission, path is a directory), or OutputStreamWriter with a bad encoding name throws UnsupportedEncodingException (subclass of IOException).
Common situations: Data file path points to a non-existent or read-only directory; running as a user without write access; invalid/typo'd character encoding configured in the step (e.g. 'utf8 ' vs 'UTF-8' handled differently by some JVMs); disk full on temp volume.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- ChangeFileEncoding.Error.CreatingFile
- ex.getMessage()
- Exporting jobs: Couldn't create file
- Exporting transformation: Couldn't create file
- MailConnection.Error.SavingMessageContent
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5bb7fd704fe36eb5.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadDataOutput.java:107
dataFile = space.environmentSubstitute( dataFile );
if ( Utils.isEmpty( dataFile ) ) {
throw new KettleException( BaseMessages.getString( PKG, "GPload.Exception.DataFileMissing" ) );
}
log.logDetailed( "Creating temporary load file " + dataFile );
os = new FileOutputStream( dataFile, false );
//
String encoding = meta.getEncoding();
if ( Utils.isEmpty( encoding ) ) {
// Use the default encoding.
output = new PrintWriter( new BufferedWriter( new OutputStreamWriter( os ) ) );
} else {
// Use the specified encoding
output = new PrintWriter( new BufferedWriter( new OutputStreamWriter( os, encoding ) ) );
}
} catch ( IOException e ) {
throw new KettleException( "GPLoadDataOutput.Exception" + e.getMessage(), e );
}
}
public void close() throws IOException {
if ( output != null ) {
output.close();
}
}
PrintWriter getOutput() {
return output;
}
protected void setOutput( PrintWriter output ) {
this.output = output;
}
private String createEscapedString( String orig, String enclosure ) {View on GitHub (pinned to f3058517a1)