quarkusio/quarkus · error · MojoExecutionException
Unable to render config section for section: ${section} in e
Error message
Unable to render config section for section: ${section} in extension: ${extension} What it means
GenerateConfigDocMojo wraps any exception thrown while rendering a per-extension generated config section template with Qute into a MojoExecutionException naming the section and extension. The original cause (usually a Qute template evaluation error) is attached as the cause.
Source
Thrown at devtools/config-doc-maven-plugin/src/main/java/io/quarkus/maven/config/doc/GenerateConfigDocMojo.java:216
for (ConfigSection generatedConfigSection : extensionConfigSectionsEntry.getValue()) {
if (generatedConfigSection.getNonDeprecatedItems().isEmpty()) {
continue;
}
Path configSectionPath = resolvedTargetDirectory.resolve(String.format(CONFIG_ROOT_FILE_FORMAT,
extension.artifactId(), cleanSectionPath(generatedConfigSection.getPath().property()),
normalizedFormat.getExtension()));
String summaryTableId = formatter
.toAnchor(extension.artifactId() + "_" + generatedConfigSection.getPath().property());
Context context = new Context(summaryTableId, false);
try {
Files.writeString(configSectionPath,
generateConfigReference(quteEngine, context, extension, generatedConfigSection,
"_" + generatedConfigSection.getPath().property(), false));
} catch (Exception e) {
throw new MojoExecutionException(
"Unable to render config section for section: " + generatedConfigSection.getPath().property()
+ " in extension: " + extension,
e);
}
}
}
if (generateAllConfig) {
// we generate the file centralizing all the config properties
try {
Path allConfigPath = resolvedTargetDirectory.resolve(String.format(ALL_CONFIG_FILE_FORMAT,
normalizedFormat.getExtension()));
Context context = new Context("all-config", true);
Files.writeString(allConfigPath, generateAllConfig(quteEngine, context, mergedModel.getConfigRoots()));
} catch (Exception e) {
throw new MojoExecutionException("Unable to render all config", e);View on GitHub (pinned to e1c734241f)
Solutions
- Inspect the cause chain of the MojoExecutionException for the actual Qute/template error
- Check the output directory is writable and the section file path is valid on your OS
- Regenerate with a clean target directory (mvn clean) and retry
Example fix
// before mvn generate-config-doc -DtargetDirectory=/read-only/out // after mvn clean generate-config-doc -DtargetDirectory=./target/generated-docs
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure output dir is writable before invoking the plugin
Path dir = Paths.get(targetDirectory);
if (Files.exists(dir)) {
assert Files.isWritable(dir);
} Try / catch
try {
mojo.execute();
} catch (MojoExecutionException e) {
Throwable cause = e.getCause();
logger.error("Section render failed: " + e.getMessage(), cause);
} Prevention
- Run with a clean, writable target directory
- Keep Qute templates and plugin version in sync
- Avoid exotic characters in config section paths
When it happens
Trigger: During execute(), when Files.writeString(generateConfigReference(...)) for a generated ConfigSection throws — typically a Qute template evaluation failure, missing anchor data, or an I/O error writing the section file.
Common situations: A generated config section references a template variable that does not exist; output directory is not writable; a section path contains characters invalid for the target filesystem.
Related errors
- Unable to render all config
- Unable to determine groupId and artifactId of the jar that c
- Unable to determine groupId and artifactId of the extension
- Unable to determine groupId and artifactId of the jar that c
- Unable to parse pom file: ${pom}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/93b1fa0ee24fd7b7.
Report an issue: GitHub.