{"record":{"id":"825c279af7ebfb23","repo":"quarkusio/quarkus","slug":"the-class-is-not-inside-the-jandex-index","errorCode":null,"errorMessage":"The class  is not inside the Jandex index","messagePattern":"The class  is not inside the Jandex index","errorType":"exception","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java","lineNumber":347,"sourceCode":"     * @param info the ClassInfo we want to check.\n     * @param parentName the name of the superclass we want to find.\n     * @return true if the given ClassInfo has <tt>parentName</tt> as a superclass.\n     * @throws BuildException if one of the superclasses is not indexed.\n     */\n    public static boolean isSubclassOf(IndexView index, ClassInfo info, DotName parentName) throws BuildException {\n        if (info.superName().equals(DOTNAME_OBJECT) || info.superName().equals(DOTNAME_RECORD)) {\n            return false;\n        }\n        if (info.superName().equals(parentName)) {\n            return true;\n        }\n\n        // climb up the hierarchy of classes\n        Type superType = info.superClassType();\n        ClassInfo superClass = index.getClassByName(superType.name());\n        if (superClass == null) {\n            // this can happens if the parent is not inside the Jandex index\n            throw new BuildException(\"The class \" + superType.name() + \" is not inside the Jandex index\",\n                    Collections.emptyList());\n        }\n        return isSubclassOf(index, superClass, parentName);\n    }\n\n    private static class ClassNotIndexedException extends RuntimeException {\n\n        private final DotName dotName;\n\n        public ClassNotIndexedException(DotName dotName) {\n            super(\"'\" + dotName.toString() + \"' is not indexed\");\n            this.dotName = dotName;\n        }\n    }\n\n}\n","sourceCodeStart":329,"sourceCodeEnd":364,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java#L329-L364","documentation":"isSubclassOf climbs the superclass chain using the Jandex index; when the parent class of the inspected class cannot be found in the IndexView it throws a BuildException saying the class is not indexed. Quarkus requires every class touched during augmentation (or at least its hierarchy) to be part of the computed Jandex index, otherwise subclass checks cannot be completed.","triggerScenarios":"Calling JandexUtil.isSubclassOf (directly or via build steps) on a class whose superclass is missing from the index — e.g. a class extending a JDK class, a dependency class excluded from indexing, or generated bytecode not added to the index.","commonSituations":"Classes extending non-application classes (java.* / framework classes) that are not indexed; additional-modules or index configuration omitting a dependency jar; QuarkusAnnotationProcessor/Jandex maven plugin not configured for generated sources; classloading artifacts in tests.","solutions":["Ensure the parent class is part of the Jandex index: configure the Jandex index to include the jar/module containing it (quarkus.index-dependency in application.properties).","If extending a JDK/framework class not meant to be indexed, restructure so the subclass check is not needed or the parent is an indexed application class.","For generated code, register generated sources with the Jandex processor so the hierarchy is indexed.","Use quarkus.index-dependency.<name>.group-id/artifact-id in application.properties for third-party dependencies that need indexing."],"exampleFix":"# before\n(no index configuration for shared-lib)\n# after\nquarkus.index-dependency.shared.group-id=com.acme\nquarkus.index-dependency.shared.artifact-id=shared-lib","handlingStrategy":"validation","validationCode":"static void requireIndexed(io.quarkus.builder.index.IndexView index, org.jboss.jandex.DotName name) {\n    if (index.getClassByName(name) == null)\n        throw new IllegalStateException(\"Class not indexed: \" + name + \"; add quarkus.index-dependency for its artifact\");\n}\n// config check:\n// quarkus.index-dependency.shared.group-id=com.acme\n// quarkus.index-dependency.shared.artifact-id=shared-lib","typeGuard":"boolean isIndexed = index.getClassByName(superType.name()) != null;","tryCatchPattern":"try { augment(); } catch (BuildException e) { if (e.getMessage().contains(\"is not inside the Jandex index\")) { /* add index-dependency config or generated-source indexing */ } else throw e; }","preventionTips":["Register third-party dependencies needing indexing via quarkus.index-dependency.*","Configure the Jandex annotation processor for generated sources","Avoid extending JDK/framework classes that are never indexed"],"tags":["jandex","indexing","build-time"],"backgroundTag":"class-not-in-jandex-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"}