pentaho/pentaho-kettle · error · KettleException
e.getMessage()
Error message
e.getMessage()
What it means
getRequestBodyParamsAsStr encodes parameter pairs with URLEncoder.encode using a charset; if that charset is not supported by the JVM, UnsupportedEncodingException is caught and rethrown as KettleException whose message is e.getMessage() (the unsupported charset name).
Solutions
- Set the step Encoding to a valid charset name such as 'UTF-8' or 'ISO-8859-1'.
- Leave the encoding blank to fall back to DEFAULT_ENCODING when unsure.
- Verify supported names via Charset.availableCharsets() or java.nio.charset docs.
- Fix any environment variable supplying the encoding value.
Example fix
// before (dialog config) encoding="utf_8"; // invalid // after encoding="UTF-8"; // valid IANA charset name
Defensive patterns
Strategy: validation
Validate before calling
String enc = meta.getEncoding();
if (enc != null && !enc.isEmpty() && !java.nio.charset.Charset.isSupported(enc))
throw new KettleException("Unsupported encoding: " + enc); Prevention
- Use canonical charset names (UTF-8, ISO-8859-1)
- Leave Encoding blank to use the default
When it happens
Trigger: bodyParams or getRequestBodyParametersAsStringWithNullEncoding call getRequestBodyParamsAsStr; the step's configured encoding (meta.getEncoding(), via data.realEncoding/charset) is not a supported charset name (e.g. misspelled 'utf_8', 'utf-8859-1').
Common situations: Typo in the 'Encoding' field of the step dialog; using an encoding name not present on the JVM; passing user/env-provided encoding strings like '${ENC}' that resolve incorrectly.
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
- Unable to convert String to Binary with specified string…
- ConcatFields.Error.UnsupportedEncoding
- HTTPPOST.Exception.CouldnotFindField
- HTTPPOST.Exception.CouldnotFindRequestEntityField
- HTTPPOST.Exception.ErrorFindingField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c1324d3659dc0297.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/httppost/HTTPPOST.java:521
StringBuffer buf = new StringBuffer();
try {
for ( int i = 0; i < pairs.length; ++i ) {
NameValuePair pair = pairs[ i ];
if ( pair.getName() != null ) {
if ( i > 0 ) {
buf.append( "&" );
}
buf.append( URLEncoder.encode( pair.getName(), !StringUtil.isEmpty( charset ) ? charset : DEFAULT_ENCODING ) );
buf.append( "=" );
if ( pair.getValue() != null ) {
buf.append( URLEncoder.encode( pair.getValue(), !StringUtil.isEmpty( charset ) ? charset : DEFAULT_ENCODING ) );
}
}
}
return buf.toString();
} catch ( UnsupportedEncodingException e ) {
throw new KettleException( e.getMessage(), e.getCause() );
}
}
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (HTTPPOSTMeta) smi;
data = (HTTPPOSTData) sdi;
if ( super.init( smi, sdi ) ) {
// get authentication settings once
data.realProxyHost = environmentSubstitute( meta.getProxyHost() );
data.realProxyPort = Const.toInt( environmentSubstitute( meta.getProxyPort() ), 8080 );
data.realHttpLogin = environmentSubstitute( meta.getHttpLogin() );
data.realHttpPassword = Utils.resolvePassword( variables, meta.getHttpPassword() );
data.realSocketTimeout = Const.toInt( environmentSubstitute( meta.getSocketTimeout() ), -1 );
data.realConnectionTimeout = Const.toInt( environmentSubstitute( meta.getSocketTimeout() ), -1 );
data.realcloseIdleConnectionsTime =
Const.toInt( environmentSubstitute( meta.getCloseIdleConnectionsTime() ), -1 );View on GitHub (pinned to f3058517a1)