{"record":{"id":"f554a83cc434bda6","repo":"quarkusio/quarkus","slug":"no-template-matching-the-path-templatepath-could","errorCode":null,"errorMessage":"No template matching the path <templatePath> could be found for: <targetClass>.<method>","messagePattern":"No template matching the path <templatePath> could be found for: <targetClass>\\.<method>","errorType":"exception","errorClass":"io.quarkus.qute.TemplateException","httpStatus":null,"severity":"error","filePath":"extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java","lineNumber":399,"sourceCode":"                if (checkedTemplate != null) {\n                    throw new TemplateException(\n                            String.format(\n                                    \"Multiple checked templates exist for the template path %s:\\n\\t- %s: %s\\n\\t- %s\",\n                                    fullPath, method.declaringClass().name(), method,\n                                    checkedTemplate));\n                }\n                if (!filePaths.contains(templatePath)\n                        && isNotLocatedByCustomTemplateLocator(locatorPatternsBuildItem.getLocationPatterns(),\n                                templatePath)) {\n                    List<String> startsWith = new ArrayList<>();\n                    for (String filePath : filePaths.getFilePaths()) {\n                        if (filePath.startsWith(templatePath)\n                                && filePath.charAt(templatePath.length()) == '.') {\n                            startsWith.add(filePath);\n                        }\n                    }\n                    if (startsWith.isEmpty()) {\n                        throw new TemplateException(\n                                \"No template matching the path \" + templatePath + \" could be found for: \"\n                                        + targetClass.name() + \".\" + method.name());\n                    } else {\n                        throw new TemplateException(\n                                startsWith + \" match the path \" + templatePath\n                                        + \" but the file suffix is not configured via the quarkus.qute.suffixes property\");\n                    }\n                }\n\n                Map<String, String> bindings = new HashMap<>();\n                List<Type> parameters = method.parameterTypes();\n                List<String> parameterNames = new ArrayList<>(parameters.size());\n                for (int i = 0; i < parameters.size(); i++) {\n                    Type type = parameters.get(i);\n                    String name = method.parameterName(i);\n                    if (name == null) {\n                        throw new TemplateException(\"Parameter names not recorded for \" + targetClass.name()\n                                + \": compile the class with -parameters\");","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java#L381-L417","documentation":"After resolving a @CheckedTemplate method's expected template path, Qute verifies a template file with that path exists among indexed templates. If no file starting with that path (with a configured suffix) exists, TemplateException is thrown naming the path and the declaring class/method.","triggerScenarios":"A @CheckedTemplate method refers to templates/hello.txt etc. but no template file at that path exists in src/main/resources/templates; path typo, wrong basePath, or file never created.","commonSituations":"Renaming/moving template files without updating the Templates class; case-sensitive filesystems where Hello.html ≠ hello.html; template placed in the wrong directory; missing suffix configuration for unusual extensions.","solutions":["Create the template file at the exact path reported (under src/main/resources/templates)","Fix the basePath/@CheckedTemplate annotation or method name to match the actual file","Verify file name case and extension; if using a non-default extension, add it to quarkus.qute.suffixes"],"exampleFix":"// before: Templates.page() with no file\n// after\n$ touch src/main/resources/templates/page.html\n","handlingStrategy":"validation","validationCode":"// Verify template resource exists before app start\nString path = \"templates/page.html\";\nif (getClass().getClassLoader().getResource(path) == null)\n    throw new IllegalStateException(\"Template missing: \" + path);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create the template file in the same commit as the Templates method","Watch out for filename case on Linux filesystems","Keep template paths and @CheckedTemplate(basePath) in sync; add suffixes to quarkus.qute.suffixes if non-standard"],"tags":["qute","checked-templates","missing-file","template-path"],"backgroundTag":"template-file-not-found","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"}