{"record":{"id":"eaaf2076febf170a","repo":"pentaho/pentaho-kettle","slug":"there-was-an-error-passing-the-exported-transformation-to","errorCode":null,"errorMessage":"There was an error passing the exported transformation to the remote server: ","messagePattern":"There was an error passing the exported transformation to the remote server: ","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/Trans.java","lineNumber":4380,"sourceCode":"          //the executionConfiguration should not include a repository here because all the resources should be\n          //retrieved from the exported zip file\n          TransExecutionConfiguration clonedConfiguration = (TransExecutionConfiguration) executionConfiguration.clone();\n          clonedConfiguration.setRepository( null );\n          Bowl globalBowl = repository != null ? repository.getBowl() : DefaultBowl.getInstance();\n          TopLevelResource topLevelResource =\n            ResourceUtil.serializeResourceExportInterface( transMeta.getBowl(), globalBowl, tempFile.getName().toString(),\n              transMeta, transMeta, repository, metaStore, clonedConfiguration.getXML(),\n              CONFIGURATION_IN_EXPORT_FILENAME );\n\n          // Send the zip file over to the slave server...\n          //\n          String result = slaveServer.sendExport(\n            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","sourceCodeStart":4362,"sourceCodeEnd":4398,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/Trans.java#L4362-L4398","documentation":"Thrown by Trans.sendToSlaveServer(...) when exporting the transformation (with all referenced resources) as an archive to the remote server: SlaveServer.sendExport(...) to RegisterPackageServlet returned a WebResult that is not 'OK', so the remote server rejected or failed to import the exported transformation package.","triggerScenarios":"Remote execution with exporting (send to slave as exported zip) enabled: slave's register-package servlet answers with an error after receiving the archive, e.g. failed to unzip, invalid archive contents, or the referenced resources could not be materialized remotely.","commonSituations":"Transformation references repository objects not exported correctly; archive too large or truncated on upload; slave's file system lacks write space/permissions for the export; Kettle version mismatch causing import failure.","solutions":["Read the appended webResult.getMessage() for the slave's import error and check the slave's carte.log.","Retry with a smaller/simpler export: confirm referenced connections/sub-transformations resolve before export.","Check the slave has disk space and write permission in its temp/upload directory.","Verify network stability during upload (timeouts on large archives).","Align Kettle versions between client and slave; alternatively send XML (register-trans servlet path) instead of an export."],"exampleFix":"// before: unreadable referenced sub-transformation breaks export\n// ensure references resolve before sending\ntransMeta.setFilename(null);\nTopLevelResource res = ResourceUtil.serializeResourceExportInterface(...);\nString result = slaveServer.sendExport(res.getArchiveName(), RegisterPackageServlet.TYPE_TRANS, res.getBaseResourceName());\n// after: validate first\nif (!new File(res.getArchiveName()).canRead()) throw new KettleException(\"Export archive missing\");\nString result = slaveServer.sendExport(res.getArchiveName(), RegisterPackageServlet.TYPE_TRANS, res.getBaseResourceName());","handlingStrategy":"try-catch","validationCode":"// verify the export archive exists and referenced resources resolve before sending\nFile archive = new File(topLevelResource.getArchiveName());\nif (!archive.canRead() || archive.length() == 0) {\n  throw new KettleException(\"Export archive missing or empty: \" + archive);\n}","typeGuard":null,"tryCatchPattern":"try {\n  Trans.sendToSlaveServer(transMeta, config, repository, metaStore);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"exported transformation\")) {\n    log.error(\"Slave rejected export: \" + e.getMessage(), e);\n    // check slave disk space/permissions and version, then retry\n  } else throw e;\n}","preventionTips":["Confirm all referenced connections/sub-transformations resolve before export.","Check slave disk space and temp write permissions.","Keep client and slave Kettle versions aligned.","For large archives, raise upload timeouts and avoid intermediaries."],"tags":["kettle","remote-execution","export","slave-server"],"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"}