{"record":{"id":"b2141f5cf6840931","repo":"quarkusio/quarkus","slug":"class-rawclassname-used-in-the-parameter-decla","errorCode":null,"errorMessage":"Class [<rawClassName>] used in the parameter declaration in template [<templatePath>] on line <line> was not found in the application index. Make sure it is spelled correctly.","messagePattern":"Class \\[<rawClassName>\\] used in the parameter declaration in template \\[<templatePath>\\] on line <line> was not found in the application index\\. Make sure it is spelled correctly\\.","errorType":"exception","errorClass":"io.quarkus.qute.TemplateException","httpStatus":null,"severity":"error","filePath":"extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeInfos.java","lineNumber":141,"sourceCode":"        return null;\n    }\n\n    static boolean isArray(String typeInfo) {\n        return typeInfo == null ? false : typeInfo.indexOf(ARRAY_DIM) > 0;\n    }\n\n    private static ClassInfo getClassInfo(String val, IndexView index, Function<String, String> templateIdToPathFun,\n            Origin expressionOrigin) {\n        DotName rawClassName = rawClassName(val);\n        ClassInfo clazz = index.getClassByName(rawClassName);\n        if (clazz == null) {\n            if (!rawClassName.toString().contains(\".\")) {\n                // Try the java.lang prefix for a name without package\n                rawClassName = DotName.createSimple(Types.JAVA_LANG_PREFIX + rawClassName.toString());\n                clazz = index.getClassByName(rawClassName);\n            }\n            if (clazz == null) {\n                throw new TemplateException(\n                        \"Class [\" + rawClassName + \"] used in the parameter declaration in template [\"\n                                + templateIdToPathFun.apply(expressionOrigin.getTemplateGeneratedId()) + \"] on line \"\n                                + expressionOrigin.getLine()\n                                + \" was not found in the application index. Make sure it is spelled correctly.\");\n            }\n        }\n        return clazz;\n    }\n\n    private static PrimitiveType decodePrimitive(String val) {\n        switch (val) {\n            case \"byte\":\n                return PrimitiveType.BYTE;\n            case \"char\":\n                return PrimitiveType.CHAR;\n            case \"double\":\n                return PrimitiveType.DOUBLE;\n            case \"float\":","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeInfos.java#L123-L159","documentation":"Qute type-safe template parameter declarations (e.g. {@org.acme.Item item}) reference classes that must exist in the Jandex application index. When the raw class name cannot be resolved (even after trying the java.lang package prefix), TypeInfos throws this TemplateException during template expression validation.","triggerScenarios":"A template declares {@com.example.Missing param} where com.example.Missing is not in the application index — class doesn't exist, is misspelled, lives in a non-indexed jar, or was excluded from indexing.","commonSituations":"Typo in a fully-qualified class name in a {@...} declaration; referencing a class from a dependency not indexed by Quarkus; class removed after a refactor while templates still reference it; using a simple name for a class not in java.lang.","solutions":["Fix the spelling / package of the class name in the template's parameter declaration","Verify the class is part of the application or an indexed dependency (classes in src/main/java are indexed automatically)","Use the fully-qualified name, since only java.lang simple names are auto-resolved","Rebuild the application so Jandex re-indexes the class"],"exampleFix":"// before (template)\n{@org.acme.Itemm item}\n// after (template)\n{@org.acme.Item item}","handlingStrategy":"validation","validationCode":"// Pre-check in a build step or test\nString className = \"org.acme.Item\";\nboolean indexed = index.getClassByName(DotName.createSimple(className)) != null;\nif (!indexed) throw new IllegalStateException(\"Template parameter class not indexed: \" + className);","typeGuard":null,"tryCatchPattern":"try {\n    // build-time template validation happens automatically\n} catch (TemplateException e) {\n    if (e.getMessage().contains(\"was not found in the application index\")) {\n        log.error(\"Fix the class name in the template parameter declaration\");\n        throw e;\n    }\n}","preventionTips":["Use fully-qualified class names in {@...} declarations unless the class is in java.lang","Run the build (which validates templates) before shipping template changes","After renaming/removing classes, grep templates for the old names","Ensure referenced types come from indexed application/dependency classes"],"tags":["qute","templates","jandex","type-checking"],"backgroundTag":"class-not-found-in-application-index","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}