{"record":{"id":"3811845704801264","repo":"quarkusio/quarkus","slug":"error-while-rendering-template-source-absolutep","errorCode":null,"errorMessage":"Error while rendering template: + source.absolutePath()","messagePattern":"Error while rendering template: \\+ source\\.absolutePath\\(\\)","errorType":"exception","errorClass":"CodestartException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/reader/QuteCodestartFileReader.java","lineNumber":90,"sourceCode":"                .addResultMapper(new MissingValueMapper())\n                .removeStandaloneLines(true)\n                // For now we need to disable strict rendering for codestarts\n                // A param of an {#if} section is not considered falsy if the value represents a \"not found\" result\n                // https://github.com/quarkusio/quarkus/pull/18227#discussion_r662301281\n                .strictRendering(false)\n                .addLocator(\n                        id -> findIncludeTemplate(source.getCodestartResource(), languageName, id)\n                                .map(IncludeTemplateLocation::new))\n                .addLocator(\n                        id -> findIncludeTemplate(projectResource, languageName, id)\n                                .map(IncludeTemplateLocation::new))\n                .addLocator(id -> Optional.of(new FallbackTemplateLocation()))\n                .addSectionHelper(new EvalSectionHelper.Factory())\n                .build();\n        try {\n            return engine.parse(content, null, templateId).render(data);\n        } catch (Exception e) {\n            throw new CodestartException(\"Error while rendering template: \" + source.absolutePath(), e);\n        }\n    }\n\n    private static Optional<Source> findIncludeTemplate(CodestartResource projectResource, String languageName, String name) {\n        final String includeFileName = name + INCLUDE_QUTE_FLAG;\n        final Optional<Source> languageIncludeSource = projectResource.getSource(languageName, includeFileName);\n        if (languageIncludeSource.isPresent()) {\n            return languageIncludeSource;\n        }\n        final Optional<Source> baseIncludeSource = projectResource.getSource(\"base\", includeFileName);\n        if (baseIncludeSource.isPresent()) {\n            return baseIncludeSource;\n        }\n        return Optional.empty();\n    }\n\n    private static class FallbackTemplateLocation implements TemplateLocator.TemplateLocation {\n","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/reader/QuteCodestartFileReader.java#L72-L108","documentation":"readQuteFile parses a codestart Qute template and renders it with the provided data map. Any exception during parse or render (unresolved expression, bad include, syntax error) is wrapped in this CodestartException naming the source template. The root cause is attached as the cause.","triggerScenarios":"Generating a project from a codestart whose template file contains invalid Qute syntax, references an undefined {expression} with no default, or includes a nonexistent {#include} template.","commonSituations":"Editing codestart templates and introducing a typo in an expression; template conditions referencing missing config keys; include name mismatches (missing `.qute.` include file for the language).","solutions":["Inspect the wrapped cause exception to find the failing expression/line in the named template","Fix the Qute syntax or define/default the missing data key in the codestart's data map","Verify any {#include ...} targets exist as `<name>.qute.*` files for the language"],"exampleFix":"# before (template)\nValue: {config.missingKey}\n# after\nValue: {config.missingKey ?: 'default'}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { renderTemplate(...); }\ncatch (CodestartException e) {\n    log.error(\"Render failed for \" + e.getMessage() + \", cause:\", e.getCause());\n}","preventionTips":["Test template rendering in CI","Default missing keys with '?:'","Validate include targets per language"],"tags":["templating","qute","codestart"],"backgroundTag":"template-render-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}