Quarkus ignores SKIP_PARSE_PERSISTENCE_XML when started in development mode
See original GitHub issueDescribe 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 -aorver: 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 --versionorgradlew --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:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Related StackOverflow Question
I can give it a try.
I forgot to mention that we should keep running for a while both versions of the app. 😃 My bad!