{"record":{"id":"4d4ee86d54b64a52","repo":"pentaho/pentaho-kettle","slug":"there-was-an-error-posting-the-transformation-on-the-remote","errorCode":null,"errorMessage":"There was an error posting the transformation on the remote server: ","messagePattern":"There was an error posting the transformation on the remote server: ","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/Trans.java","lineNumber":4393,"sourceCode":"            topLevelResource.getArchiveName(),\n            RegisterPackageServlet.TYPE_TRANS,\n            topLevelResource.getBaseResourceName() );\n          WebResult webResult = WebResult.fromXMLString( result );\n          if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n            throw new KettleException( \"There was an error passing the exported transformation to the remote server: \"\n              + Const.CR + webResult.getMessage() );\n          }\n          carteObjectId = webResult.getId();\n        }\n      } else {\n\n        // Now send it off to the remote server...\n        //\n        String xml = new TransConfiguration( transMeta, executionConfiguration ).getXML();\n        String reply = slaveServer.sendXML( xml, RegisterTransServlet.CONTEXT_PATH + \"/?xml=Y\" );\n        WebResult webResult = WebResult.fromXMLString( reply );\n        if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n          throw new KettleException( \"There was an error posting the transformation on the remote server: \" + Const.CR\n            + webResult.getMessage() );\n        }\n        carteObjectId = webResult.getId();\n      }\n\n      // Prepare the transformation\n      //\n      String reply =\n        slaveServer.execService( PrepareExecutionTransServlet.CONTEXT_PATH + \"/?name=\" + URLEncoder.encode( transMeta\n          .getName(), \"UTF-8\" ) + \"&xml=Y&id=\" + carteObjectId );\n      WebResult webResult = WebResult.fromXMLString( reply );\n      if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n        throw new KettleException( \"There was an error preparing the transformation for excution on the remote server: \"\n          + Const.CR + webResult.getMessage() );\n      }\n\n      // Start the transformation\n      //","sourceCodeStart":4375,"sourceCodeEnd":4411,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/Trans.java#L4375-L4411","documentation":"Thrown by Trans.sendToSlaveServer(...) on the non-export path: the transformation configuration XML is POSTed to RegisterTransServlet via SlaveServer.sendXML(...), and the returned WebResult is not 'OK', meaning the remote server failed to register the transformation for later execution.","triggerScenarios":"Remote execution without resource exporting: slaveServer.sendXML(TransConfiguration XML, RegisterTransServlet) returns an error WebResult because the slave could not parse/store the submitted transformation configuration.","commonSituations":"Missing steps/plugins on the remote server causing TransMeta load failure; XML truncated by proxy or size limit; authentication rejection returned as non-OK result; character-encoding issues in variable values embedded in the XML.","solutions":["Read the appended webResult.getMessage() and the slave's carte.log to see why registration failed.","Install the same plugins/steps on the slave as the submitting client.","Check for proxies/limits that truncate or block large XML POST bodies.","Verify Carte credentials/authorization for the register-trans servlet.","Escape/normalize variable values (control characters) before building the configuration, or switch to the export path."],"exampleFix":"// before: slave missing a custom step\nString reply = slaveServer.sendXML(xml, RegisterTransServlet.CONTEXT_PATH + \"/?xml=Y\");\n// after: verify plugin availability remotely first, then send\nif (slaveServer.getServerInfo() == null) throw new KettleException(\"Slave unreachable\");\n// deploy matching plugins to the slave, then:\nString reply = slaveServer.sendXML(xml, RegisterTransServlet.CONTEXT_PATH + \"/?xml=Y\");","handlingStrategy":"try-catch","validationCode":"// verify slave reachable and info available before registering the transformation\nif (slaveServer.getServerInfo() == null) {\n  throw new KettleException(\"Slave \" + slaveServer.getName() + \" not reachable for registration\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  Trans.sendToSlaveServer(transMeta, config, repository, metaStore);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"posting the transformation\")) {\n    log.error(\"Slave failed to register transformation: \" + e.getMessage(), e);\n    // install missing plugins / check carte.log, then retry\n  } else throw e;\n}","preventionTips":["Install the same plugins on slaves as on the submitting client.","Check carte.log on the slave when registration fails.","Watch for proxies/size limits truncating XML POSTs.","Verify Carte credentials for the register-trans servlet."],"tags":["kettle","remote-execution","slave-server","registration"],"backgroundTag":"api-error-response","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"}