Skip to content

Conversation

lucamolteni
Copy link
Contributor

@lucamolteni lucamolteni commented May 29, 2025

Fixes: #30002 (comment)

Based on the original work of https://github.com/xdev-software https://github.com/quarkusio/quarkus/pull/47695/files

This handles some of the issues addressed in #30002 (comment)

To be added in the Migration Guide:

Hibernate ORM

MySQL/MariaDB storage engine

Setting the MySQL/MariaDB storage engine through property quarkus.hibernate-orm.dialect.storage-engine has been deprecated.
Use one of these configuration keys instead:

quarkus.hibernate-orm.dialect.mariadb.storage-engine=...
quarkus.hibernate-orm.dialect.dialect.mysql.storage-engine=...

Done:

  • A start-offline setting
  • Code that turns this setting into hibernate.boot.allow_jdbc_metadata_access=*.
    io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfigPersistenceUnit.HibernateOrmConfigPersistenceUnitDatabase#versionCheckEnabled should default to false when asked to start offline, and lead to an exception with a clear message when it's explicitly set to true while starting offline.
  • io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfigPersistenceUnit.HibernateOrmConfigPersistenceUnitSchemaManagement#strategy should default to none when asked to start offline, and lead to an exception with a clear message when it's explicitly set to anything else while starting offline.
  • Handling of temporary tables
  • Setting up specific dialect configuration

@lucamolteni lucamolteni requested review from gsmet and yrodiere and removed request for yrodiere May 29, 2025 12:19
@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/hibernate-orm Hibernate ORM area/hibernate-search Hibernate Search area/hibernate-reactive Hibernate Reactive area/panache area/spring Issues relating to the Spring integration labels May 29, 2025
Copy link

quarkus-bot bot commented May 29, 2025

/cc @gsmet (hibernate-orm,hibernate-search), @marko-bekhta (hibernate-search)

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM overall, though I have concerns about the temporary table thing -- see below.

To be merged after #41310 as it's based on @yrodiere Hibernate 7 branch, creating a Draft PR

FWIW if you're only going to address #30002 (and not #13522) in this PR, you can probably base your work on main. I don't expect anything here to require the upgrade to ORM 7, and this would allow merging your PR more quickly.

@AB-xdev
Copy link
Contributor

AB-xdev commented Jun 30, 2025

Can someone give me an update on the current state of the PR?

We're still eagerly waiting for this feature :)

@yrodiere
Copy link
Member

yrodiere commented Jul 1, 2025

As you can see, it's work in progress. Luca is otherwise occupied right now and will come back to it.

@lucamolteni lucamolteni force-pushed the 13522 branch 2 times, most recently from 5082566 to bf33cd9 Compare July 22, 2025 14:27
Copy link

github-actions bot commented Jul 22, 2025

🙈 The PR is closed and the preview is expired.

@lucamolteni lucamolteni force-pushed the 13522 branch 2 times, most recently from 485a43e to 7adc22c Compare July 24, 2025 15:41
@lucamolteni
Copy link
Contributor Author

@yrodiere

FWIW there's a bunch there: https://github.com/quarkusio/quarkus/tree/81042d375abf7300274fcdd5d4454da09d90d5a5/integration-tests/hibernate-search-orm-elasticsearch/src/test/java/io/quarkus/it/hibernate/search/orm/elasticsearch/devservices
It's for Elasticsearch / Hibernate Search rather than Hibernate ORM, but general principles should hold.

Those tests disable DevServices rather enabling it, so I assume they're always enabled implicitly and the last commit to test is fine (with the Dev UI text fixed) ok?

@yrodiere
Copy link
Member

@yrodiere

FWIW there's a bunch there: https://github.com/quarkusio/quarkus/tree/81042d375abf7300274fcdd5d4454da09d90d5a5/integration-tests/hibernate-search-orm-elasticsearch/src/test/java/io/quarkus/it/hibernate/search/orm/elasticsearch/devservices
It's for Elasticsearch / Hibernate Search rather than Hibernate ORM, but general principles should hold.

Those tests disable DevServices rather enabling it, so I assume they're always enabled implicitly

Yes they're enabled implicitly in tests: https://github.com/quarkusio/quarkus/blob/81042d375abf7300274fcdd5d4454da09d90d5a5/integration-tests/hibernate-search-orm-elasticsearch/src/test/java/io/quarkus/it/hibernate/search/orm/elasticsearch/devservices/HibernateSearchElasticsearchDevServicesEnabledImplicitlyTest.java

and the last commit to test is fine (with the Dev UI text fixed) ok?

Yes that commit looks good to me

@lucamolteni lucamolteni force-pushed the 13522 branch 3 times, most recently from 1d4502a to f3def84 Compare July 25, 2025 14:58

This comment has been minimized.

@lucamolteni
Copy link
Contributor Author

This seems related to this patch, it happens only in Native mode

025-08-04T14:12:26.2768287Z  --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
2025-08-04T14:12:26.2768666Z  -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
2025-08-04T14:12:26.2768987Z --\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2025-08-04T14:12:26.2770308Z 2025-08-04 14:12:26,223 WARN  [org.mar.jdb.mes.ser.ErrorPacket] (JPA Startup Thread: RecordedStateKey[name=<default>, isReactive=false]) Error: 4091-42S02: Unknown SEQUENCE: 'hibernate_orm_test.Address_SEQ'
2025-08-04T14:12:26.2772891Z 2025-08-04 14:12:26,223 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (JPA Startup Thread: RecordedStateKey[name=<default>, isReactive=false]) GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence Address_SEQ" via JDBC [(conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Address_SEQ']: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence Address_SEQ" via JDBC [(conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Address_SEQ']
2025-08-04T14:12:26.2775250Z 	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:93)
2025-08-04T14:12:26.2776114Z 	at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:222)
2025-08-04T14:12:26.2776778Z 	at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:208)
2025-08-04T14:12:26.2777565Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:342)
2025-08-04T14:12:26.2778712Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:268)
2025-08-04T14:12:26.2779633Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:217)
2025-08-04T14:12:26.2780453Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:185)
2025-08-04T14:12:26.2781216Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:155)
2025-08-04T14:12:26.2782299Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:115)
2025-08-04T14:12:26.2783270Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:225)
2025-08-04T14:12:26.2784368Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:142)
2025-08-04T14:12:26.2785138Z 	at [email protected]/java.util.HashMap.forEach(HashMap.java:1429)
2025-08-04T14:12:26.2785843Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:139)
2025-08-04T14:12:26.2787066Z 	at io.quarkus.hibernate.orm.runtime.observers.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:21)
2025-08-04T14:12:26.2795034Z 	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
2025-08-04T14:12:26.2795946Z 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:350)
2025-08-04T14:12:26.2796837Z 	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:97)
2025-08-04T14:12:26.2798376Z 	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:90)
2025-08-04T14:12:26.2799733Z 	at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:90)
2025-08-04T14:12:26.2805035Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:182)
2025-08-04T14:12:26.2805798Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:67)
2025-08-04T14:12:26.2806277Z 	at [email protected]/java.lang.Thread.runWith(Thread.java:1596)
2025-08-04T14:12:26.2806718Z 	at [email protected]/java.lang.Thread.run(Thread.java:1583)
2025-08-04T14:12:26.2807443Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
2025-08-04T14:12:26.2808668Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
2025-08-04T14:12:26.2809492Z Caused by: java.sql.SQLSyntaxErrorException: (conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Address_SEQ'
2025-08-04T14:12:26.2810460Z 	at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:289)
2025-08-04T14:12:26.2811135Z 	at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:378)
2025-08-04T14:12:26.2811746Z 	at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:187)
2025-08-04T14:12:26.2812390Z 	at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:1379)
2025-08-04T14:12:26.2813079Z 	at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:1318)
2025-08-04T14:12:26.2813784Z 	at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:1237)
2025-08-04T14:12:26.2814431Z 	at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:1161)
2025-08-04T14:12:26.2814991Z 	at org.mariadb.jdbc.Statement.executeInternal(Statement.java:1003)
2025-08-04T14:12:26.2815484Z 	at org.mariadb.jdbc.Statement.execute(Statement.java:1132)
2025-08-04T14:12:26.2815960Z 	at org.mariadb.jdbc.Statement.execute(Statement.java:471)
2025-08-04T14:12:26.2816538Z 	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:220)
2025-08-04T14:12:26.2817389Z 	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:79)
2025-08-04T14:12:26.2818346Z 	... 24 more
2025-08-04T14:12:26.2818467Z 
2025-08-04T14:12:26.2844146Z 2025-08-04 14:12:26,224 WARN  [org.mar.jdb.mes.ser.ErrorPacket] (JPA Startup Thread: RecordedStateKey[name=<default>, isReactive=false]) Error: 4091-42S02: Unknown SEQUENCE: 'hibernate_orm_test.Person_SEQ'
2025-08-04T14:12:26.2846874Z 2025-08-04 14:12:26,225 WARN  [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (JPA Startup Thread: RecordedStateKey[name=<default>, isReactive=false]) GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence Person_SEQ" via JDBC [(conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Person_SEQ']: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence Person_SEQ" via JDBC [(conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Person_SEQ']
2025-08-04T14:12:26.2857011Z 	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:93)
2025-08-04T14:12:26.2857850Z 	at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:222)
2025-08-04T14:12:26.2858837Z 	at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:208)
2025-08-04T14:12:26.2859575Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:342)
2025-08-04T14:12:26.2860445Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:268)
2025-08-04T14:12:26.2861380Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:217)
2025-08-04T14:12:26.2862193Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:185)
2025-08-04T14:12:26.2862954Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:155)
2025-08-04T14:12:26.2863724Z 	at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:115)
2025-08-04T14:12:26.2864711Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:225)
2025-08-04T14:12:26.2865776Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:142)
2025-08-04T14:12:26.2866469Z 	at [email protected]/java.util.HashMap.forEach(HashMap.java:1429)
2025-08-04T14:12:26.2867160Z 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:139)
2025-08-04T14:12:26.2868624Z 	at io.quarkus.hibernate.orm.runtime.observers.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:21)
2025-08-04T14:12:26.2869838Z 	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
2025-08-04T14:12:26.2870857Z 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:350)
2025-08-04T14:12:26.2871711Z 	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:97)
2025-08-04T14:12:26.2872972Z 	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:90)
2025-08-04T14:12:26.2874031Z 	at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:90)
2025-08-04T14:12:26.2874738Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:182)
2025-08-04T14:12:26.2875377Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:67)
2025-08-04T14:12:26.2875903Z 	at [email protected]/java.lang.Thread.runWith(Thread.java:1596)
2025-08-04T14:12:26.2876340Z 	at [email protected]/java.lang.Thread.run(Thread.java:1583)
2025-08-04T14:12:26.2877054Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
2025-08-04T14:12:26.2878433Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
2025-08-04T14:12:26.2879447Z Caused by: java.sql.SQLSyntaxErrorException: (conn=35) Unknown SEQUENCE: 'hibernate_orm_test.Person_SEQ'
2025-08-04T14:12:26.2880311Z 	at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:289)
2025-08-04T14:12:26.2881095Z 	at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:378)
2025-08-04T14:12:26.2881952Z 	at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:187)
2025-08-04T14:12:26.2882593Z 	at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:1379)
2025-08-04T14:12:26.2883255Z 	at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:1318)
2025-08-04T14:12:26.2883937Z 	at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:1237)
2025-08-04T14:12:26.2884606Z 	at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:1161)
2025-08-04T14:12:26.2885187Z 	at org.mariadb.jdbc.Statement.executeInternal(Statement.java:1003)
2025-08-04T14:12:26.2885657Z 	at org.mariadb.jdbc.Statement.execute(Statement.java:1132)
2025-08-04T14:12:26.2886103Z 	at org.mariadb.jdbc.Statement.execute(Statement.java:471)
2025-08-04T14:12:26.2886629Z 	at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:220)
2025-08-04T14:12:26.2887378Z 	at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:79)
2025-08-04T14:12:26.2888135Z 	... 24 more
2025-08-04T14:12:26.2888276Z 
2025-08-04T14:12:26.2888875Z Failed to launch the application. The application logs can be found at: /home/runner/_work/quarkus/quarkus/integration-tests/jpa-mariadb/target/quarkus.log
2025-08-04T14:12:26.2889885Z 2025-08-04 14:12:26,235 ERROR [io.qua.run.Application] (main) Failed to start application: java.lang.RuntimeException: Failed to start quarkus
2025-08-04T14:12:26.2890582Z 	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
2025-08-04T14:12:26.2891042Z 	at io.quarkus.runtime.Application.start(Application.java:101)
2025-08-04T14:12:26.2891614Z 	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
2025-08-04T14:12:26.2903602Z 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:80)
2025-08-04T14:12:26.2904204Z 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:51)
2025-08-04T14:12:26.2904609Z 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:144)
2025-08-04T14:12:26.2905030Z 	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
2025-08-04T14:12:26.2905777Z Caused by: jakarta.persistence.PersistenceException: [PersistenceUnit: offline] Unable to build Hibernate SessionFactory
2025-08-04T14:12:26.2906938Z 	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.persistenceException(FastBootEntityManagerFactoryBuilder.java:132)
2025-08-04T14:12:26.2908650Z 	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:99)
2025-08-04T14:12:26.2909901Z 	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:90)
2025-08-04T14:12:26.2911033Z 	at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:90)
2025-08-04T14:12:26.2911743Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:182)
2025-08-04T14:12:26.2912355Z 	at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:67)
2025-08-04T14:12:26.2912867Z 	at [email protected]/java.lang.Thread.runWith(Thread.java:1596)
2025-08-04T14:12:26.2913299Z 	at [email protected]/java.lang.Thread.run(Thread.java:1583)
2025-08-04T14:12:26.2914015Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
2025-08-04T14:12:26.2918564Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
2025-08-04T14:12:26.2920629Z Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableMutationStrategy] as strategy [org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy]
2025-08-04T14:12:26.2922507Z 	at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:83)
2025-08-04T14:12:26.2923892Z 	at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:163)
2025-08-04T14:12:26.2924976Z 	at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:118)
2025-08-04T14:12:26.2926102Z 	at org.hibernate.boot.internal.SessionFactoryOptionsBuilder.resolveSqmMutationStrategy(SessionFactoryOptionsBuilder.java:613)
2025-08-04T14:12:26.2927162Z 	at org.hibernate.boot.internal.SessionFactoryOptionsBuilder.<init>(SessionFactoryOptionsBuilder.java:394)
2025-08-04T14:12:26.2928501Z 	at io.quarkus.hibernate.orm.runtime.recording.PrevalidatedQuarkusMetadata.buildSessionFactoryOptionsBuilder(PrevalidatedQuarkusMetadata.java:70)
2025-08-04T14:12:26.2929786Z 	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:94)
2025-08-04T14:12:26.2930505Z 	... 8 more
2025-08-04T14:12:26.2931431Z Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableMutationStrategy]
2025-08-04T14:12:26.2932777Z 	at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:38)
2025-08-04T14:12:26.2933849Z 	at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:79)
2025-08-04T14:12:26.2934554Z 	... 14 more
2025-08-04T14:12:26.2935214Z Caused by: java.lang.ClassNotFoundException: org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableMutationStrategy
2025-08-04T14:12:26.2936269Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:122)
2025-08-04T14:12:26.2937224Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:86)
2025-08-04T14:12:26.2938090Z 	at [email protected]/java.lang.Class.forName(DynamicHub.java:1359)
2025-08-04T14:12:26.2938583Z 	at [email protected]/java.lang.Class.forName(DynamicHub.java:1348)
2025-08-04T14:12:26.2939322Z 	at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:36)
2025-08-04T14:12:26.2939927Z 	... 15 more
2025-08-04T14:12:26.2940062Z 

This comment has been minimized.

This comment has been minimized.

lucamolteni added a commit to lucamolteni/quarkus that referenced this pull request Aug 5, 2025
…Hibernate Reactive quarkusio#48130

Added a `quarkus.hibernate-orm.database.start-offline` to avoid connecting to the database

* Disable schema validation
* Disable temporary table creation at startup, gives precedence to local temporary tables using Hibernate 7.1 local mutation strategies
* Disable schema management in offline mode for DevServices as well

New way to handle storage engine from both mysql and mariadb

Added tests for specific override of Dialect Settings

Removed unused hack MultiplePersistenceUnitsInconsistentStorageEnginesTest$H2DialectWithMySQLInTheName

Included initial draft by Steve Ebersole <[email protected]> quarkusio#43396

Co-authored-by: Steve Ebersole <[email protected]>
Co-authored-by: Yoann Rodière <[email protected]>

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

lucamolteni added a commit to lucamolteni/quarkus that referenced this pull request Aug 5, 2025
…Hibernate Reactive quarkusio#48130

Added a `quarkus.hibernate-orm.database.start-offline` to avoid connecting to the database

* Disable schema validation
* Disable temporary table creation at startup, gives precedence to local temporary tables using Hibernate 7.1 local mutation strategies
* Disable schema management in offline mode for DevServices as well

New way to handle storage engine from both mysql and mariadb

Added tests for specific override of Dialect Settings

Removed unused hack MultiplePersistenceUnitsInconsistentStorageEnginesTest$H2DialectWithMySQLInTheName

Included initial draft by Steve Ebersole <[email protected]> quarkusio#43396

Co-authored-by: Steve Ebersole <[email protected]>
Co-authored-by: Yoann Rodière <[email protected]>

This comment has been minimized.

@lucamolteni
Copy link
Contributor Author

After having registered strategies for reflection, native image tests are passing

The local temporary table strategies part will be removed when local temporary table scripts will be added to hbm2ddl

@lucamolteni
Copy link
Contributor Author

lucamolteni commented Aug 5, 2025

After having registered strategies for reflection, native image tests are passing

The local temporary table strategies part will be removed when local temporary table scripts will be added to hbm2ddl

https://hibernate.atlassian.net/browse/HHH-15525

…Hibernate Reactive quarkusio#48130

Added a `quarkus.hibernate-orm.database.start-offline` to avoid connecting to the database

* Disable schema validation
* Disable temporary table creation at startup, gives precedence to local temporary tables using Hibernate 7.1 local mutation strategies
* Disable schema management in offline mode for DevServices as well

New way to handle storage engine from both mysql and mariadb

Added tests for specific override of Dialect Settings

Removed unused hack MultiplePersistenceUnitsInconsistentStorageEnginesTest$H2DialectWithMySQLInTheName

Register for reflection the local temp strategies otherwise Native compilation is broken (to be removed after https://hibernate.atlassian.net/browse/HHH-15525)

Included initial draft by Steve Ebersole <[email protected]> quarkusio#43396

Co-authored-by: Steve Ebersole <[email protected]>
Co-authored-by: Yoann Rodière <[email protected]>

This comment has been minimized.

Copy link

quarkus-bot bot commented Aug 5, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 726df5f.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Aug 5, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 726df5f.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

mbellade pushed a commit to mbellade/quarkus that referenced this pull request Aug 7, 2025
…Hibernate Reactive quarkusio#48130

Added a `quarkus.hibernate-orm.database.start-offline` to avoid connecting to the database

* Disable schema validation
* Disable temporary table creation at startup, gives precedence to local temporary tables using Hibernate 7.1 local mutation strategies
* Disable schema management in offline mode for DevServices as well

New way to handle storage engine from both mysql and mariadb

Added tests for specific override of Dialect Settings

Removed unused hack MultiplePersistenceUnitsInconsistentStorageEnginesTest$H2DialectWithMySQLInTheName

Register for reflection the local temp strategies otherwise Native compilation is broken (to be removed after https://hibernate.atlassian.net/browse/HHH-15525)

Included initial draft by Steve Ebersole <[email protected]> quarkusio#43396

Co-authored-by: Steve Ebersole <[email protected]>
Co-authored-by: Yoann Rodière <[email protected]>
@Sanne
Copy link
Member

Sanne commented Aug 7, 2025

Replaced by #49408 (it's the same thing, but rebased by @mbellade as @lucamolteni is off)

@Sanne Sanne closed this Aug 7, 2025
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Aug 7, 2025
lucamolteni added a commit to lucamolteni/quarkus that referenced this pull request Oct 9, 2025
 Enable automatic failure on unrecognized configuration properties in test mode by default.
 Tests now fail fast when configuration typos are detected, eliminating the need for manual
 log assertions. Users can opt-out with .failOnUnknownProperties(false) when needed.

  - Add failOnUnknownProperties field to LaunchMode enum (default true for TEST mode)
  - Enhance ConfigDiagnostic.unknown() to throw IllegalArgumentException when strict mode enabled
  - Update ConfigGenerationBuildStep to always pass LaunchMode to validation
  - Add failOnUnknownProperties() method to QuarkusUnitTest for opt-out capability
  - Maintain backward compatibility: production mode unchanged, warnings only

  See quarkusio#48130 (comment)
lucamolteni added a commit to lucamolteni/quarkus that referenced this pull request Oct 10, 2025
 Enable automatic failure on unrecognized configuration properties in test mode by default.
 Tests now fail fast when configuration typos are detected, eliminating the need for manual
 log assertions. Users can opt-out with .failOnUnknownProperties(false) when needed.

  - Use System property `quarkus.debug.fail-on-missing-properties` for feature flag
  - Enhance ConfigDiagnostic.unknown() to throw IllegalArgumentException when strict mode enabled
  - Add failOnUnknownProperties() method to QuarkusUnitTest for opt-out capability
  - Maintain backward compatibility: production mode unchanged, warnings only

  See quarkusio#48130 (comment)

  # Release notes

  Added property `quarkus.debug.fail-on-missing-properties` to make application fail when an unknown property is being set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/docstyle issues related for manual docstyle review area/documentation area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive area/hibernate-search Hibernate Search area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/panache area/spring Issues relating to the Spring integration triage/flaky-test triage/invalid This doesn't seem right triage/on-ice Frozen until external concerns are resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hibernate ORM tries to connect to the database on startup even with schema validation disabled

8 participants