pentaho/pentaho-kettle · error · KettleXMLException
WebResult.Error.UnableCreateResult
Error message
WebResult.Error.UnableCreateResult
What it means
WebResult.fromXMLString parses an XML string and builds a WebResult from it; any failure loading the XML, locating the XML_TAG root node, or constructing WebResult(node) is wrapped in KettleXMLException with the localized 'WebResult.Error.UnableCreateResult' message. It signals the response XML could not be converted into a WebResult.
Solutions
- Log/inspect the cause (e.getCause()) and the raw input string to see what was actually received.
- Verify the HTTP response status/content-type before parsing — only parse bodies that are the expected WebResult XML.
- Check that the XML contains the <webresult> root tag; if parsing server output, fix the server-side handler.
- Handle non-XML error responses (auth pages, proxy errors) separately before calling fromXMLString.
Example fix
// before
WebResult result = WebResult.fromXMLString( responseBody );
// after
if ( responseBody != null && responseBody.contains( "<webresult>" ) ) {
WebResult result = WebResult.fromXMLString( responseBody );
} else {
// handle unexpected/non-XML response
} Defensive patterns
Strategy: try-catch
Validate before calling
if ( xml == null || !xml.trim().startsWith( "<" ) || !xml.contains( "<webresult>" ) ) {
throw new IllegalStateException( "Not a WebResult XML payload" );
} Type guard
boolean looksLikeWebResult( String xml ) {
return xml != null && xml.contains( "<webresult" );
} Try / catch
try {
WebResult r = WebResult.fromXMLString( xml );
} catch ( KettleXMLException e ) {
log.error( "Unable to create WebResult from payload: " + xml, e.getCause() );
} Prevention
- Check HTTP status and content-type before parsing bodies
- Log the raw response on parse failure
- Handle HTML error pages / empty bodies as separate cases
When it happens
Trigger: Passing malformed XML, an empty/non-XML string, or XML lacking the expected <webresult> root element (XML_TAG) to WebResult.fromXMLString.
Common situations: Parsing the response of a Pentaho Carte/HTTP web service when the server returned an HTML error page, an empty body, or a non-standard payload instead of the expected WebResult XML.
Related errors
- Error loading transformation step from XML
- Error loading transformation step from XML
- Invalid Transformation - Missing…
- Invalid Transformation Name
- NullIfMeta.Exception.UnableToReadStepInfoFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/4a30d567d22cfe9a.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/www/WebResult.java:100
this.result = result;
}
public String getMessage() {
return message;
}
public void setMessage( String message ) {
this.message = message;
}
public static WebResult fromXMLString( String xml ) throws KettleXMLException {
try {
Document doc = XMLHandler.loadXMLString( xml );
Node node = XMLHandler.getSubNode( doc, XML_TAG );
return new WebResult( node );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "WebResult.Error.UnableCreateResult" ), e );
}
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId( String id ) {
this.id = id;
}
}View on GitHub (pinned to f3058517a1)