pentaho/pentaho-kettle · error · KettleException
Unsupported character encoding:
Error message
Unsupported character encoding:
What it means
encodeRecordTerminator converts the configured record terminator string to bytes in the configured character encoding and renders it as hex for the SQL*Loader control file. If the JVM does not support the configured encoding, UnsupportedEncodingException is caught and rethrown as 'Unsupported character encoding: <encoding>'.
Solutions
- Use a standard IANA encoding name such as UTF-8, ISO-8859-1 or US-ASCII in the loader's encoding setting
- Check the JVM's supported encodings (Charset.availableCharsets()) and pick one of those
- Fix the typo in the configured encoding value
Example fix
// before meta.setEncoding( "utf_8" ); // after meta.setEncoding( "UTF-8" );
Defensive patterns
Strategy: validation
Validate before calling
if ( !Charset.isSupported( encoding ) ) {
throw new KettleException( "Unsupported encoding: " + encoding );
} Try / catch
try {
controlFile = OraBulkLoaderMeta.getControlFileContents( meta, transMeta, prev );
} catch ( KettleException e ) {
if ( e.getMessage().startsWith( "Unsupported character encoding" ) ) {
logError( "Fix encoding setting: " + e.getMessage() );
}
} Prevention
- Use canonical IANA names: UTF-8, ISO-8859-1, US-ASCII
- Validate configured encodings against Charset.isSupported at startup
- Do not copy encoding strings from other platforms/tools without checking
When it happens
Trigger: getControlFileContents calls encodeRecordTerminator with an encoding string not recognized by the JVM (Charset.forName/new String equivalent lookup fails).
Common situations: Typo in the encoding setting (e.g. 'utf8' vs 'UTF-8', 'UTF_8'); encoding copied from a different platform; running on a JVM with a reduced charset provider (compact profiles).
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- ConcatFields.Error.UnsupportedEncoding
- e.getMessage()
- Error retrieving sqlldr string
- Error while closing output
- Error while executing sqlldr ''
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c0c1297356abc6cc.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java:177
try {
// use terminator in hex representation due to character set
// terminator in hex representation must be in character set
// of data file
if ( Utils.isEmpty( encoding ) ) {
bytes = in.getBytes();
} else {
bytes = in.getBytes( encoding );
}
for ( byte aByte : bytes ) {
final String hex = Integer.toHexString( aByte );
if ( hex.length() == 1 ) {
out.append( '0' );
}
out.append( hex );
}
} catch ( UnsupportedEncodingException e ) {
throw new KettleException( "Unsupported character encoding: " + encoding, e );
}
return out.toString();
}
/**
* Get the contents of the control file as specified in the meta object
*
* @param meta
* the meta object to model the control file after
*
* @return a string containing the control file contents
*/
public String getControlFileContents( OraBulkLoaderMeta meta, RowMetaInterface rm, Object[] r ) throws KettleException {
DatabaseMeta dm = meta.getDatabaseMeta();
String inputName = "'" + getFilename( getFileObject( meta.getDataFile(), getTransMeta() ) ) + "'";
String loadAction = meta.getLoadAction();View on GitHub (pinned to f3058517a1)