pentaho/pentaho-kettle · error · ServletException

Unable to get the transformation status in XML format

Error message

Unable to get the transformation status in XML format

What it means

GetTransStatusServlet.doGet wraps any KettleException raised while building the transformation status XML into a ServletException with this message, producing HTTP 500. The underlying exception is attached as the cause.

Solutions

  1. Inspect the wrapped cause in the Carte log (often the OOM 'Log string is too long').
  2. Reduce requested log lines or trans logging level; raise heap if OOM.
  3. Retry the request once the transformation is finished/stopped and stable.
  4. Bypass the cache (dontUseCache) if a stale cached XML entry triggers the failure.

Example fix

// before
String xml = httpGet("/kettle/transStatus/?name=mytrans&xml=Y");
// after
try {
  String xml = httpGet("/kettle/transStatus/?name=mytrans&xml=Y");
} catch (HttpServerErrorException e) {
  trimLogBuffer("mytrans"); retryWithBackoff("/kettle/transStatus/?name=mytrans&xml=Y");
}
Defensive patterns

Strategy: try-catch

Validate before calling

// request bounded logs to reduce failure odds
String url = "/kettle/transStatus/?name=" + transName + "&xml=Y&fromline=" + lastSeenLine;
boolean withinLimits = (lastSeenLine >= 0);

Try / catch

try {
  String xml = httpGet(url);
} catch (HttpServerErrorException e) {
  log.warn("transStatus XML failed; cause in server log");
  // fall back to HTML status, which avoids XML serialization path
  String html = httpGet("/kettle/transStatus/?name=" + transName);
}

Prevention

When it happens

Trigger: GET /kettle/transStatus/?name=<trans>&xml=Y where generating the TransStatus XML fails — e.g. log buffer retrieval OOM (see 'Log string is too long'), step status serialization failure, or querying a transformation mid-inconsistent state.

Common situations: Monitoring a transformation with a huge log buffer; polling immediately after trans stop where step data is torn down; cache logic storing/rebuilding XML for a finished trans whose log was rotated.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/4af7c28e2e6df008. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/www/GetTransStatusServlet.java:312

            //
            transStatus.setPaused( trans.isPaused() );

            // Send the result back as XML
            //
            String xml = transStatus.getXML( sendResultXmlWithStatus );
            data = xml.getBytes( Charset.forName( Const.XML_ENCODING ) );
            out = response.getOutputStream();
            response.setContentLength( XML_HEADER.length + data.length );
            out.write( XML_HEADER );
            out.write( data );
            out.flush();
            if ( finishedOrStopped && ( transStatus.isFinished() || transStatus.isStopped() ) && logId != null && !dontUseCache ) {
              cache.put( logId, xml, startLineNr );
            }
          }
          response.flushBuffer();
        } catch ( KettleException e ) {
          throw new ServletException( "Unable to get the transformation status in XML format", e );
        }

      } else {
        PrintWriter out = response.getWriter();

        int lastLineNr = KettleLogStore.getLastBufferLineNr();
        int tableBorder = 0;

        response.setContentType( "text/html;charset=UTF-8" );

        out.println( "<HTML>" );
        out.println( "<HEAD>" );
        out.println( "<TITLE>"
          + BaseMessages.getString( PKG, "TransStatusServlet.KettleTransStatus" ) + "</TITLE>" );
        if ( EnvUtil.getSystemProperty( Const.KETTLE_CARTE_REFRESH_STATUS, "N" ).equalsIgnoreCase( "Y" ) ) {
          out.println( "<META http-equiv=\"Refresh\" content=\"10;url="
            + convertContextPath( CONTEXT_PATH ) + "?name=" + URLEncoder.encode( transName, "UTF-8" ) + "&id="
            + URLEncoder.encode( id, "UTF-8" ) + "\">" );

View on GitHub (pinned to f3058517a1)