{"record":{"id":"c233410cf8d4d6a4","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-encountered-probably-encoding-decoding","errorCode":null,"errorMessage":"Unexpected error encountered, probably encoding/decoding base64 data","messagePattern":"Unexpected error encountered, probably encoding/decoding base64 data","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/RemoteStep.java","lineNumber":188,"sourceCode":"    xml.append( XMLHandler.addTagValue( \"hostname\", hostname, false ) );\n    xml.append( XMLHandler.addTagValue( \"remote_hostname\", remoteHostname, false ) );\n    xml.append( XMLHandler.addTagValue( \"port\", port, false ) );\n    xml.append( XMLHandler.addTagValue( \"buffer_size\", bufferSize, false ) );\n    xml.append( XMLHandler.addTagValue( \"compressed_streams\", compressingStreams, false ) );\n\n    xml.append( XMLHandler.addTagValue( \"source_step_name\", sourceStep, false ) );\n    xml.append( XMLHandler.addTagValue( \"source_step_copy\", sourceStepCopyNr, false ) );\n    xml.append( XMLHandler.addTagValue( \"target_step_name\", targetStep, false ) );\n    xml.append( XMLHandler.addTagValue( \"target_step_copy\", targetStepCopyNr, false ) );\n\n    xml.append( XMLHandler.addTagValue( \"source_slave_server_name\", sourceSlaveServerName, false ) );\n    xml.append( XMLHandler.addTagValue( \"target_slave_server_name\", targetSlaveServerName, false ) );\n\n    if ( rowMeta != null ) {\n      try {\n        xml.append( rowMeta.getMetaXML() );\n      } catch ( IOException e ) {\n        throw new RuntimeException( \"Unexpected error encountered, probably encoding/decoding base64 data\", e );\n      }\n    }\n    xml.append( XMLHandler.addTagValue( \"encrypted_streams\", encryptingStreams, false ) );\n    try {\n      xml.append( XMLHandler.addTagValue( \"key\", key ) );\n    } catch ( Exception ex ) {\n      baseStep.logError( \"Unable to parse key\", ex );\n    }\n    xml.append( XMLHandler.closeTag( XML_TAG ) );\n    return xml.toString();\n  }\n\n  public RemoteStep( Node node ) throws KettleException {\n\n    hostname = XMLHandler.getTagValue( node, \"hostname\" );\n    remoteHostname = XMLHandler.getTagValue( node, \"remote_hostname\" );\n    port = XMLHandler.getTagValue( node, \"port\" );\n    bufferSize = Integer.parseInt( XMLHandler.getTagValue( node, \"buffer_size\" ) );","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/RemoteStep.java#L170-L206","documentation":"Thrown by RemoteStep.getXML during serialization when RowMeta.getMetaXML() throws an IOException while base64-encoding the row metadata for the XML representation. This indicates an internal failure in the base64 encode/decode machinery, not a user problem.","triggerScenarios":"Calling getXML() on a RemoteStep whose rowMeta is non-null and whose internal serialization to base64 fails with an IOException from the underlying encoder.","commonSituations":"Rare environment-level issues such as corrupted JVM charset providers or a broken/patched encoder; practically an internal-invariant situation during clustering serialization.","solutions":["Inspect the wrapped IOException cause for the actual encoding failure.","Verify the JVM's default charset and available charsets are intact (Charset.availableCharsets()).","Retry serialization in a clean JVM; if reproducible, report as a Kettle bug with the cause stack.","As a workaround, null out or rebuild the rowMeta before calling getXML()."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { String xml = remoteStep.getXML(); } catch (RuntimeException e) { if (e.getMessage().contains(\"encoding/decoding base64\")) { log.error(\"Base64 serialization failed\", e.getCause()); } else { throw e; } }","preventionTips":["Keep rowMeta well-formed and rebuilt from a valid RowMetaInterface","Do not patch/replace JVM charset providers","Report reproducible cases to the Kettle project with the cause stack"],"tags":["kettle","serialization","base64","xml"],"backgroundTag":"json-marshal-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}