quarkusio/quarkus · error · IllegalArgumentException
Cannot parse version from output: ${stringOutput}
Error message
Cannot parse version from output:
${stringOutput} What it means
GraalVM.of() runs the native-image/graalvm binary with --version and parses the output with VersionParseHelper. If the process output contains no recognizable version line, this IllegalArgumentException is thrown so the build fails early instead of mis-detecting native-image capabilities.
Source
Thrown at core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java:307
public boolean jdkVersionGreaterOrEqualTo(String version) {
return javaVersion.compareToIgnoreOptional(Runtime.Version.parse(version)) >= 0;
}
public static Version of(Stream<String> output) {
String stringOutput = output.collect(Collectors.joining("\n"));
List<String> lines = stringOutput.lines()
.dropWhile(l -> !l.startsWith("GraalVM") && !l.startsWith("native-image"))
.toList();
if (lines.size() == 3) {
Version parsedVersion = VersionParseHelper.parse(lines);
if (parsedVersion != VersionParseHelper.UNKNOWN_VERSION) {
return parsedVersion;
}
}
throw new IllegalArgumentException(
"Cannot parse version from output: \n" + stringOutput);
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Check the echoed stringOutput in the message to see what the binary actually printed.
- Point quarkus.native.builder-image (or GRAALVM_HOME) at a GraalVM/Mandrel version supported by your Quarkus release.
- Run the binary manually with --version to confirm it outputs a standard version line.
- Remove wrapper scripts/exports that print banners (e.g. SDKMAN init output, MOTD) before the version.
- Upgrade Quarkus if your GraalVM/Mandrel release is newer than what this Quarkus version supports.
Example fix
# before quarkus.native.builder-image=quay.io/my-custom-image:latest # after quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:22.3-java17
Defensive patterns
Strategy: validation
Validate before calling
// Validate your native-image toolchain before building
String version = System.getenv("GRAALVM_HOME") == null ? null
: ProcessHandle.class == null ? null : null;
// Simpler: run the binary yourself and check output
// $GRAALVM_HOME/bin/native-image --version # must print e.g. 'native-image 22.3.0'
// or for containers:
// docker run <builder-image> --version Prevention
- Pin a supported builder image: quay.io/quarkus/ubi-quarkus-native-image:<version>.
- Match GraalVM/Mandrel version to your Quarkus release matrix.
- Run --version manually before a long native build.
- Avoid wrapper scripts that print banners before tool output.
When it happens
Trigger: Native image build config points at a binary whose --version output is unrecognized: a very old/new GraalVM release, a non-GraalVM binary (e.g. plain java), a wrapper script printing extra banners, or localized output.
Common situations: GRAALVM_HOME or quarkus.native.builder-image misconfigured; Mandrel vs GraalVM distribution differences; corporate wrappers printing warnings before the version line; unsupported/pre-release GraalVM version newer than the Quarkus release.
Related errors
- Not Implemented in native mode
- Unable to create new instance for ${clazz}
- .pfa font files are not supported. Use TrueType fonts, i.e.
- .pfb font files are not supported. Use TrueType fonts, i.e.
- Unable to set tmp java.home for FontConfig Quarkus AWT usage
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/d779d7c77cb4af3e.
Report an issue: GitHub.