{"record":{"id":"fe7633740f6347a2","repo":"pentaho/pentaho-kettle","slug":"executetransservlet-error-errorexecutingtrans","errorCode":"ExecuteTransServlet.Error.ErrorExecutingTrans","errorMessage":"ExecuteTransServlet.Error.ErrorExecutingTrans","messagePattern":"ExecuteTransServlet\\.Error\\.ErrorExecutingTrans","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/www/ExecuteTransServlet.java","lineNumber":332,"sourceCode":"      //\n      trans.setServletPrintWriter( out );\n      trans.setServletReponse( response );\n      trans.setServletRequest( request );\n\n      try {\n        // Execute the transformation...\n        //\n        executeTrans( trans );\n        String logging = KettleLogStore.getAppender().getBuffer( trans.getLogChannelId(), false ).toString();\n        if ( trans.isFinishedOrStopped() && trans.getErrors() > 0 ) {\n          response.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );\n          out.println( new WebResult( WebResult.STRING_ERROR, BaseMessages.getString(\n            PKG, \"ExecuteTransServlet.Error.ErrorExecutingTrans\", logging ) ) );\n        }\n        out.flush();\n      } catch ( Exception executionException ) {\n        String logging = KettleLogStore.getAppender().getBuffer( trans.getLogChannelId(), false ).toString();\n        throw new KettleException( BaseMessages.getString( PKG, \"ExecuteTransServlet.Error.ErrorExecutingTrans\", logging ), executionException );\n      }\n    } catch ( Exception ex ) {\n      // When we get to this point KettleAuthenticationException has already been wrapped in an Execution Exception\n      // and that in a KettleException\n      Throwable kettleExceptionCause = ex.getCause();\n      if ( kettleExceptionCause != null && kettleExceptionCause instanceof ExecutionException ) {\n        Throwable executionExceptionCause = kettleExceptionCause.getCause();\n        if ( executionExceptionCause != null && executionExceptionCause instanceof KettleAuthenticationException ) {\n          response.setStatus( HttpServletResponse.SC_UNAUTHORIZED );\n          out.println( new WebResult( WebResult.STRING_ERROR, BaseMessages.getString(\n                  PKG, \"ExecuteTransServlet.Error.Authentication\", getContextPath() ) ) );\n        }\n      } else if ( ex.getMessage().contains( UNABLE_TO_FIND_TRANS ) ) {\n        response.setStatus( HttpServletResponse.SC_NOT_FOUND );\n        out.println( new WebResult( WebResult.STRING_ERROR, BaseMessages.getString(\n                PKG, \"ExecuteTransServlet.Error.UnableToFindTransformation\", transOption ) ) );\n      } else {\n        response.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/ExecuteTransServlet.java#L314-L350","documentation":"KettleException thrown by ExecuteTransServlet.doGet when the transformation execution fails; the transformation's log buffer is attached as the message and the original exception as the cause. It wraps any error during trans execution (steps failing, resource errors, runtime exceptions) so the HTTP caller receives a single descriptive failure.","triggerScenarios":"GET /kettle/executeTrans/ authenticates and prepares the TransMeta successfully, but trans.execute()/waitUntilFinished() throws or the execution exception path is reached — logged content is captured via KettleLogStore.getAppender().getBuffer(trans.getLogChannelId()).","commonSituations":"Transformation step errors (DB connection failures, missing files/tables); variables/parameters unresolved at runtime; OOM or resource limits on the Carte server; plugin/step class missing at runtime.","solutions":["Read the transformation log in the exception message/cause to find the failing step","Fix the underlying transformation error (connection, file path, parameter values)","Ensure required variables and parameters are passed in the request or set on the server","Check the Carte server logs and memory availability","Test the transformation locally in Spoon with the same runtime parameters"],"exampleFix":"// before\n// client ignores cause details\n} catch ( KettleException e ) { LOG.error(\"trans failed\"); }\n// after\n} catch ( KettleException e ) {\n  LOG.error( \"Transformation failed: \" + e.getMessage(), e.getCause() ); // cause holds the step-level error\n}","handlingStrategy":"try-catch","validationCode":"// Validate before execution: parameters present and connection-able resources\nfor ( String var : requiredVars ) {\n  if ( transMeta.getParameterValue( var ) == null && System.getProperty( var ) == null ) {\n    throw new IllegalStateException( \"Missing parameter: \" + var );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  // executeTrans call\n} catch ( KettleException e ) {\n  // message contains the transformation log buffer; persist it for diagnosis\n  LOG.error( \"Trans execution failed:\\n\" + e.getMessage(), e );\n}","preventionTips":["Pass all required variables/parameters in the request","Pre-test transformations in Spoon with production-like inputs","Monitor Carte server memory for OOM-driven execution failures","Keep step plugins installed and version-matched on the server"],"tags":["transformation","execution","servlet","pdi"],"backgroundTag":"http-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"}