{"record":{"id":"ab93c3158959fc4f","repo":"quarkusio/quarkus","slug":"unable-to-properly-register-the-hierarchy-of-the-f","errorCode":null,"errorMessage":"Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:\n${unindexedClasses}Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.","messagePattern":"Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:\n(.+?)Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans\\.xml or quarkus\\.index-dependency properties\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java","lineNumber":139,"sourceCode":"\n        if (!collector.enumTypes.isEmpty()) {\n            reflectiveClass.produce(ReflectiveClassBuildItem.builder(\"java.lang.Enum\").methods().build());\n            reflectiveClass.produce(ReflectiveClassBuildItem.builder(collector.enumTypes).methods().build());\n        }\n\n        // for the java types we collected (usually from java.time but it could be from other types),\n        // we just register them for reflection\n        reflectiveClass.produce(ReflectiveClassBuildItem.builder(collector.javaTypes).methods().build());\n\n        if (!collector.unindexedClasses.isEmpty()) {\n            Set<String> unIgnorableIndexedClasses = collector.unindexedClasses.stream().map(DotName::toString)\n                    .collect(Collectors.toSet());\n            unIgnorableIndexedClasses.removeAll(ignorableNonIndexedClasses);\n\n            if (!unIgnorableIndexedClasses.isEmpty()) {\n                final String unindexedClassesErrorMessage = unIgnorableIndexedClasses.stream().map(d -> \"\\t- \" + d + \"\\n\")\n                        .collect(Collectors.joining());\n                throw new ConfigurationException(\n                        \"Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:\\n\"\n                                + unindexedClassesErrorMessage\n                                + \"Consider adding them to the index either by creating a Jandex index \" +\n                                \"for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.\");\n            }\n        }\n\n        // Hibernate ORM will fall back to instantiating these types using reflection if they are not CDI beans,\n        // so we need to enable that.\n        forReflection = new ArrayList<>(collector.potentialCdiBeanTypes.size());\n        for (DotName javaType : collector.potentialCdiBeanTypes) {\n            forReflection.add(javaType.toString());\n        }\n        reflectiveClass.produce(ReflectiveClassBuildItem.builder(forReflection).constructors().build());\n\n        return new JpaModelBuildItem(collector.packages, collector.entityTypes, managedClassNames,\n                collector.potentialCdiBeanTypes, collector.xmlMappingsByPU);\n    }","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java#L121-L157","documentation":"Quarkus discovers and registers the JPA model (entities, mapped superclasses, embeddables) and their whole hierarchies from the Jandex index. When a superclass/interface/embeddable referenced by an indexed JPA class is itself not in the index (and cannot be ignored), JpaJandexScavenger throws a ConfigurationException listing the unindexed classes and how to index them.","triggerScenarios":"buildModelFromCollector (invoked by discoverModelAndRegisterForReflection / result) finds classes in the hierarchy of indexed JPA classes that are missing from the Jandex index and not in the ignorable set (e.g. not java.* types).","commonSituations":"Using entities from a third-party dependency without a Jandex index; adding an entity jar built without the jandex-maven-plugin, beans.xml, or quarkus.index-dependency entries; classes in a library jar produced outside Quarkus tooling.","solutions":["Add a quarkus.index-dependency entry in application.properties for the library (quarkus.index-dependency.<name>.group-id/artifact-id)","Add an empty META-INF/beans.xml to the dependency jar","Configure the jandex-maven-plugin in the library's pom.xml to generate META-INF/jandex.idx","If the classes come from your own project, ensure they are compiled as part of the application module"],"exampleFix":"// application.properties\n// before\n# nothing\n// after\nquarkus.index-dependency.entities.group-id=com.acme\nquarkus.index-dependency.entities.artifact-id=entities","handlingStrategy":"validation","validationCode":"# application.properties — index the dependency before the build:\nquarkus.index-dependency.entities.group-id=com.acme\nquarkus.index-dependency.entities.artifact-id=entities\n# or add an empty META-INF/beans.xml to the dependency jar","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add the jandex-maven-plugin to libraries containing JPA classes","Or ship an empty META-INF/beans.xml in entity-only jars","Or declare quarkus.index-dependency.* entries for third-party entity jars","Keep entity superclass hierarchies inside indexed modules"],"tags":["jandex","hibernate-orm","indexing","classpath"],"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"}