You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Quarkus startup with mvn quarkus:dev fails with java.lang.LinkageError, as soon as we use quarkus.index-dependency for external dependencies which contain javax.persistence annotated classes (e.g. JPA Entities).
It doesn't happen when we run the packaged jar file directly by using java -jar target/getting-started-1.0-SNAPSHOT-runner.jar
Expected behavior
Startup with mvn quarkus:dev should not fail with java.lang.LinkageError
Actual behavior
Quarkus fails to start when we use mvn quarkus:dev, complaining about java.lang.LinkageError.
2020-02-03 20:42:53,467 ERROR [io.qua.application] (main) Failed to start application: java.lang.LinkageError: loader constraint violation: loader 'app' wants to load interface org.axonframework.common.jpa.EntityManagerProvider. A different interface with the same name was previously loaded by io.quarkus.runner.RuntimeClassLoader @15b3e5b. (org.axonframework.common.jpa.EntityManagerProvider is in unnamed module of loader io.quarkus.runner.RuntimeClassLoader @15b3e5b, parent loader java.net.URLClassLoader @548ad73b)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.axonframework.config.AggregateConfigurer.jpaMappedConfiguration(AggregateConfigurer.java:183)
at org.acme.quickstart.AxonStarter.startup(AxonStarter.java:28)
at org.acme.quickstart.AxonStarter_Observer_startup_f43ab41051de39ca1e534f6cd06115c3c9b219b8.notify(AxonStarter_Observer_startup_f43ab41051de39ca1e534f6cd06115c3c9b219b8.zig:111)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:282)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:267)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:69)
at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:23)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:108)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent36.deploy_0(LifecycleEventsBuildStep$startupEvent36.zig:58)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent36.deploy(LifecycleEventsBuildStep$startupEvent36.zig:77)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:185)
at io.quarkus.runtime.Application.start(Application.java:87)
at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:167)
at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:178)
at io.quarkus.dev.DevModeMain.start(DevModeMain.java:96)
at io.quarkus.dev.DevModeMain.main(DevModeMain.java:67)
2020-02-03 20:42:53,476 ERROR [io.qua.dev.DevModeMain] (main) Failed to start Quarkus: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:215)
at io.quarkus.runtime.Application.start(Application.java:87)
at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:167)
at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:178)
at io.quarkus.dev.DevModeMain.start(DevModeMain.java:96)
at io.quarkus.dev.DevModeMain.main(DevModeMain.java:67)
Caused by: java.lang.LinkageError: loader constraint violation: loader 'app' wants to load interface org.axonframework.common.jpa.EntityManagerProvider. A different interface with the same name was previously loaded by io.quarkus.runner.RuntimeClassLoader @15b3e5b. (org.axonframework.common.jpa.EntityManagerProvider is in unnamed module of loader io.quarkus.runner.RuntimeClassLoader @15b3e5b, parent loader java.net.URLClassLoader @548ad73b)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.axonframework.config.AggregateConfigurer.jpaMappedConfiguration(AggregateConfigurer.java:183)
at org.acme.quickstart.AxonStarter.startup(AxonStarter.java:28)
at org.acme.quickstart.AxonStarter_Observer_startup_f43ab41051de39ca1e534f6cd06115c3c9b219b8.notify(AxonStarter_Observer_startup_f43ab41051de39ca1e534f6cd06115c3c9b219b8.zig:111)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:282)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:267)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:69)
at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:23)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:108)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent36.deploy_0(LifecycleEventsBuildStep$startupEvent36.zig:58)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent36.deploy(LifecycleEventsBuildStep$startupEvent36.zig:77)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:185)
... 5 more
Environment (please complete the following information):
Output of uname -a or ver: Linux tobi-Z97-HD3 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version: openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
GraalVM version (if different from Java): None
Quarkus version or git rev: 1.2.0.Final
Additional context
Not sure if it is exactly the same issue #5354, so I opened a new one.
However, using the latest version 1.2.0.Final won't fix it for the reproducer project in #5354.
The text was updated successfully, but these errors were encountered:
Describe the bug
Quarkus startup with
mvn quarkus:dev
fails withjava.lang.LinkageError
, as soon as we usequarkus.index-dependency
for external dependencies which containjavax.persistence
annotated classes (e.g. JPA Entities).It doesn't happen when we run the packaged jar file directly by using
java -jar target/getting-started-1.0-SNAPSHOT-runner.jar
Expected behavior
Startup with
mvn quarkus:dev
should not fail withjava.lang.LinkageError
Actual behavior
Quarkus fails to start when we use
mvn quarkus:dev
, complaining aboutjava.lang.LinkageError
.To Reproduce
Steps to reproduce the behavior:
git clone [email protected]:tgippi/quarkus-issue.git
mvn quarkus:dev
Configuration
Screenshots
Environment (please complete the following information):
uname -a
orver
:Linux tobi-Z97-HD3 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
java -version
:openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
1.2.0.Final
Additional context
Not sure if it is exactly the same issue #5354, so I opened a new one.
However, using the latest version 1.2.0.Final won't fix it for the reproducer project in #5354.
The text was updated successfully, but these errors were encountered: