{"record":{"id":"b8ae209b83da3e1c","repo":"quarkusio/quarkus","slug":"the-hibernate-orm-configuration-in-quarkus-does-no","errorCode":null,"errorMessage":"The Hibernate ORM configuration in Quarkus does not support sourcing configuration properties from resources named `hibernate.properties`, and this is now expressly prohibited as such a file could lead to unpredictable semantics. Please remove it from `${url}`","messagePattern":"The Hibernate ORM configuration in Quarkus does not support sourcing configuration properties from resources named `hibernate\\.properties`, and this is now expressly prohibited as such a file could lead to unpredictable semantics\\. Please remove it from `(.+?)`","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java","lineNumber":796,"sourceCode":"            beanValidationTraversableResolver\n                    .produce(new BeanValidationTraversableResolverBuildItem(recorder.attributeLoadedPredicate()));\n        }\n    }\n\n    private static Optional<JdbcDataSourceBuildItem> findDefaultDataSource(\n            List<JdbcDataSourceBuildItem> jdbcDataSources) {\n        return jdbcDataSources.stream()\n                .filter(JdbcDataSourceBuildItem::isDefault)\n                .findFirst();\n    }\n\n    private void validateHibernatePropertiesNotUsed() {\n        try {\n            final Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\n                    \"hibernate.properties\");\n            if (resources.hasMoreElements()) {\n                final URL url = resources.nextElement();\n                throw new IllegalStateException(\n                        \"The Hibernate ORM configuration in Quarkus does not support sourcing configuration properties from resources named `hibernate.properties`,\"\n                                + \" and this is now expressly prohibited as such a file could lead to unpredictable semantics. Please remove it from `\"\n                                + url.toExternalForm() + '`');\n            }\n        } catch (IOException e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    @BuildStep\n    void handleNativeImageImportSql(BuildProducer<NativeImageResourceBuildItem> resources,\n            List<PersistenceUnitDescriptorBuildItem> descriptors) {\n        for (PersistenceUnitDescriptorBuildItem i : descriptors) {\n            //add resources\n            String resourceName = i.getExplicitSqlImportScriptResourceName();\n            if (resourceName != null) {\n                resources.produce(new NativeImageResourceBuildItem(resourceName));\n            }","sourceCodeStart":778,"sourceCodeEnd":814,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java#L778-L814","documentation":"Quarkus configures Hibernate ORM through its own quarkus.hibernate-orm.* properties and does not read hibernate.properties; a hibernate.properties resource on the classpath could silently produce unpredictable semantics, so the build proactively fails with an IllegalStateException naming the resource URL.","triggerScenarios":"validateHibernatePropertiesNotUsed (called from the main build step) finds a classloader resource named 'hibernate.properties' via Thread.currentThread().getContextClassLoader().getResources().","commonSituations":"Migrating a plain Hibernate/Spring project that still ships hibernate.properties in src/main/resources; a transitive dependency bundling hibernate.properties in its jar.","solutions":["Delete hibernate.properties from src/main/resources and move needed settings into quarkus.hibernate-orm.* properties","If it comes from a dependency jar, exclude that resource/jar or override via quarkus.hibernate-orm.* settings after confirming no hibernate.properties remains"],"exampleFix":"// before: src/main/resources/hibernate.properties\nhibernate.show_sql=true\n// after: application.properties\nquarkus.hibernate-orm.log.sql=true","handlingStrategy":"validation","validationCode":"if (getClass().getResource(\"/hibernate.properties\") != null) {\n    throw new IllegalStateException(\"Remove hibernate.properties; use quarkus.hibernate-orm.*\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Delete hibernate.properties from src/main/resources before migrating to Quarkus","Translate each hibernate.properties entry into its quarkus.hibernate-orm.* equivalent","Check dependency jars for bundled hibernate.properties (e.g. jar tf app.jar | grep hibernate.properties)"],"tags":["hibernate-orm","hibernate-properties","configuration","classpath"],"backgroundTag":"forbidden-hibernate-properties","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"}