pentaho/pentaho-kettle · error · KettleException
Unable to transform DOM node with name [ +…
Error message
Unable to transform DOM node with name [ + node.getNodeName() + ] to XML
What it means
KettleException thrown by WebService.getNodeValue when the DOM node holds complex data and the code tries to serialize it to an XML string via transformer.transform(new DOMSource(node), new StreamResult(childNodeXML)) but the transformation fails. The node's name is included in the message.
Solutions
- Read the wrapped cause 'e' in the log to see the underlying TransformerException and fix accordingly.
- Check for Xalan/JAXP implementation conflicts on the classpath and align the TransformerFactory version.
- Verify the node is still attached to a live Document (not one that has been released) before transforming.
- As a fallback, serialize manually via DOMSource with an identity transformer created fresh per call.
Defensive patterns
Strategy: try-catch
Validate before calling
// Smoke-test identity transformation once at startup to catch factory problems early:
Transformer t = TransformerFactory.newInstance().newTransformer();
t.transform(new DOMSource(DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument()),
new StreamResult(new StringWriter())); Try / catch
try {
// run transformation
} catch (KettleException e) {
if (e.getMessage() != null && e.getMessage().contains("Unable to transform DOM node")) {
// inspect e.getCause(): usually a TransformerFactory/classpath (Xalan) conflict
}
} Prevention
- Keep a single consistent Xalan/JAXP implementation on the classpath.
- Test complex-type pass-through after JVM or library upgrades.
- Ensure nodes are from a live, unreleased Document before serializing.
When it happens
Trigger: Complex-type branch of getNodeValue: TransformerConfigurationException or TransformException while serializing — bad TransformerFactory configuration, node detached from a document in a way the transformer rejects, or unsupported node state.
Common situations: Custom TransformerFactory/serializer (e.g. Xalan version conflict on the classpath) misbehaving; node obtained from a differently-built DOM that the transformer can't source; JVM with restricted XML features (security manager blocking extensions).
Related errors
- e (wrapped exception)
- Unable to get value for field [ + field.getName() + ]. …
- WebServices.ERROR0010.OutputParsingError
- AddSequenceMeta.Exception.ErrorLoadingStepInfo
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/eff5e44d66856a32.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java:1044
try {
rowValue = getValue( textContent, field );
outputRowData[ outputIndex ] = rowValue;
return true;
} catch ( Exception e ) {
throw new KettleException( "Unable to convert value ["
+ textContent + "] for field [" + field.getWsName() + "], type [" + field.getXsdType() + "]", e );
}
} else if ( node.getNodeType() == Node.ELEMENT_NODE ) {
// Perhaps we're dealing with complex data types.
// Perhaps we can just ship the XML snippet over to the next steps.
//
try {
StringWriter childNodeXML = new StringWriter();
transformer.transform( new DOMSource( node ), new StreamResult( childNodeXML ) );
outputRowData[ outputIndex ] = childNodeXML.toString();
return true;
} catch ( Exception e ) {
throw new KettleException( "Unable to transform DOM node with name [" + node.getNodeName() + "] to XML", e );
}
}
// Nothing found, return false
//
return false;
}
private Object getValue( String vNodeValue, WebServiceField field ) throws XMLStreamException, ParseException {
if ( vNodeValue == null ) {
return null;
} else {
if ( XsdType.BOOLEAN.equals( field.getXsdType() ) ) {
return Boolean.valueOf( vNodeValue );
} else if ( XsdType.DATE.equals( field.getXsdType() ) ) {
try {
return dateFormat.parse( vNodeValue );
} catch ( ParseException e ) {View on GitHub (pinned to f3058517a1)