Quarkus ignores SKIP_PARSE_PERSISTENCE_XML when started in development mode

See original GitHub issue

Describe the bug I’m trying to start Quarkus by running mvn compile quarkus:dev command and passing the system property -DSKIP_PARSE_PERSISTENCE_XML property. It fails with the following error: `2020-10-13 17:39:29,254 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: java.lang.UnsupportedOperationException: Value found for #getJtaDataSource : not supported yet at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.verifyIgnoredFields(LightPersistenceXmlDescriptor.java:164) at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.validateAndReadFrom(LightPersistenceXmlDescriptor.java:55) at io.quarkus.hibernate.orm.runtime.boot.QuarkusPersistenceUnitDefinition.<init>(QuarkusPersistenceUnitDefinition.java:30) at io.quarkus.hibernate.orm.deployment.PersistenceUnitDescriptorBuildItem.asOutputPersistenceUnitDefinition(PersistenceUnitDescriptorBuildItem.java:55) at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.build(HibernateOrmProcessor.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:479)

    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:253)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:134)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:54)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:75)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:349)
    at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:51)
    at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:132)
    at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:85)
    at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:144)
    at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)

Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: java.lang.UnsupportedOperationException: Value found for #getJtaDataSource : not supported yet at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.verifyIgnoredFields(LightPersistenceXmlDescriptor.java:164) at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.validateAndReadFrom(LightPersistenceXmlDescriptor.java:55) at io.quarkus.hibernate.orm.runtime.boot.QuarkusPersistenceUnitDefinition.<init>(QuarkusPersistenceUnitDefinition.java:30) at io.quarkus.hibernate.orm.deployment.PersistenceUnitDescriptorBuildItem.asOutputPersistenceUnitDefinition(PersistenceUnitDescriptorBuildItem.java:55) at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.build(HibernateOrmProcessor.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:479)

    at io.quarkus.builder.Execution.run(Execution.java:115)
    at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
    at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:149)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:251)
    ... 9 more

Caused by: java.lang.UnsupportedOperationException: Value found for #getJtaDataSource : not supported yet at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.verifyIgnoredFields(LightPersistenceXmlDescriptor.java:164) at io.quarkus.hibernate.orm.runtime.boot.LightPersistenceXmlDescriptor.validateAndReadFrom(LightPersistenceXmlDescriptor.java:55) at io.quarkus.hibernate.orm.runtime.boot.QuarkusPersistenceUnitDefinition.<init>(QuarkusPersistenceUnitDefinition.java:30) at io.quarkus.hibernate.orm.deployment.PersistenceUnitDescriptorBuildItem.asOutputPersistenceUnitDefinition(PersistenceUnitDescriptorBuildItem.java:55) at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.build(HibernateOrmProcessor.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:479) **Expected behavior** The application should run and ignore the content frompersistence.xml` file according to this PR.

I should mention that if I run mvn test -Dtest=SomeTestCase -DSKIP_PARSE_PERSISTENCE_XML or java-jar *-runner.jar -DSKIP_PARSE_PERSISTENCE_XML it works well.

Actual behavior The application is not started.

To Reproduce

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).

Or attach an archive containing the reproducer to the issue.

Steps to reproduce the behavior: 1. 2. 3.

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver: Microsoft Windows [Version 10.0.18363.1082]
  • Output of java -version: java version “1.8.0_201” Java™ SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot™ 64-Bit Server VM (build 25.201-b09, mixed mode)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.7.1.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): Maven home: C:\Users\HR11MD.m2\wrapper\dists\apache-maven-3.6.3-bin\1iopthnavndlasol9gbrbg6bf2\apache-maven-3.6.3 Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: C:\Users\HR11MD\java\jdk1.8.0_201-ing\jre Default locale: en_US, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

Additional context (Add any other context about the problem here.)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
geoandricommented, Nov 30, 2020

I can give it a try.

1reaction
dinabogdancommented, Oct 14, 2020

I forgot to mention that we should keep running for a while both versions of the app. 😃 My bad!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Hibernate ORM and JPA - Quarkus
If hibernate is not auto generating the schema, and Quarkus is running in development mode then Quarkus will attempt to validate the database...
Read more >
Ignore persistence.xml in quarkus - Stack Overflow
Is there a way to ignore the embedded persistence. xml? It should be, according to the comment in https://github.com/quarkusio/quarkus/blob/2d ...
Read more >
How Quarkus simplifies Java persistence - Red Hat Developer
Go to the terminal where you are running Quarkus in Dev Mode. Press d to access the Quarkus Dev UI, shown in Figure...
Read more >
How to supply Hibernate properties ? - Google Groups
to Quarkus Development mailing list ... Some stackoverflow answers suggest using file persistence.xml, but they do not consider Quarkus; ...
Read more >
Getting started with Quarkus and Hibernate - Mastertheboss
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" ... Next, we can start the Quarkus application in development mode:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found