quarkusio/quarkus · error · MojoExecutionException

Failed

Error message

Failed

What it means

AnalyseCallTreeMojo.execute wraps any Exception from ReportAnalyzer.analyse(clazz, method) into this generic MojoExecutionException with the cause attached. The report file exists but could not be parsed or the class/method was not found in it.

Source

Thrown at devtools/maven/src/main/java/io/quarkus/maven/AnalyseCallTreeMojo.java:52

        }
        String clazz = className;
        String method = "<init>";
        if (methodName != null) {
            int index = methodName.lastIndexOf('.');
            clazz = methodName.substring(0, index);
            method = methodName.substring(index + 1);
        }

        File[] files = reportsDir.listFiles();
        if (files == null) {
            throw new MojoFailureException("No reports in " + reportsDir);
        }
        for (File i : files) {
            if (i.getName().startsWith("call_tree")) {
                try {
                    System.out.println(new ReportAnalyzer(i.getAbsolutePath()).analyse(clazz, method));
                } catch (Exception e) {
                    throw new MojoExecutionException("Failed", e);
                }
            }
        }
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Read the 'Caused by' stack trace for the actual parse failure.
  2. Regenerate the call tree report with the same Quarkus version and current code.
  3. Confirm the target method (default constructor if unspecified) actually appears in the report.
Defensive patterns

Strategy: try-catch

Validate before calling

File[] reports = new File('target/reports').listFiles((d, n) -> n.startsWith('call_tree')); if (reports == null || reports.length == 0) throw new IllegalStateException('No call_tree report found');

Try / catch

catch (MojoExecutionException e) { e.getCause()?.printStackTrace(); log.error('Report analysis failed; regenerate the report and retry'); }

Prevention

When it happens

Trigger: ReportAnalyzer.analyse throwing while parsing a call_tree report — corrupt/truncated report file, format produced by a different Quarkus version, or the target class/method absent from the report.

Common situations: Analyzing a stale report generated for different code; report truncated by an interrupted build; mismatch between className/method parsed from methodName (defaults to <init> when only className given).

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/c85a8687f5133585. Report an issue: GitHub.