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
I have following structure in my reproducer project:
External dependency:
A class called Configuration. This is a simple pojo, no cdi bean
META-INF/beans.xml file
Quarkus project:
ConfigurationProducer - a cdi producer, creating an applicationscoped instance of the Configuration
ConfigurationValidator - Startup bean, which validates the produced Configuration in an PostConstruct
GreetingResource - a simple inject of the Configuration
On first quarkus:dev, this app starts flawlessly.
If I now hot reload, I get the exception from below.
This only happens with 2.7.0.CR1.
With 2.6.3.Final, this exception did not happen.
Expected behavior
No exceptions when hot reloading, like in 2.6.3.Final
Actual behavior
2022-01-25 09:30:46,446 INFO [io.quarkus] (Quarkus Main Thread) hot-reload-producer stopped in 0.013s
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-01-25 09:30:48,222 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.LinkageError: loader constraint violation: when r
esolving method 'void com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy.<init>(org.acme.ConfigurationProducer_ProducerMet
hod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean)' the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @73843e83 of the current class, org/acme/Configurati
onProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean, and the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3 for the method's
defining class, com/acme/spi/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy, have different Class objects for the type org/acme/Con
figurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean used in the signature (org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125
f3f16fd0e1923dbf7b49ecb1a_Bean is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @73843e83, parent loader io.quarkus.bootstrap.classloading.QuarkusCla
ssLoader @4461c7e3; com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy is in unnamed module of loader io.quarkus.bootstrap
.classloading.QuarkusClassLoader @4461c7e3, parent loader 'app')
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.proxy(Unknown Source)
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:101)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:18)
at org.acme.ConfigurationValidator_ClientProxy.arc$delegate(Unknown Source)
at org.acme.ConfigurationValidator_ClientProxy.arc_contextualInstance(Unknown Source)
at org.acme.ConfigurationValidator_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(Unknown Source)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:320)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:302)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:73)
at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:104)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
at java.base/java.lang.Thread.run(Thread.java:833)
2022-01-25 09:30:48,223 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (Aesh InputStream Reader) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to
start quarkus
at io.quarkus.dev.appstate.ApplicationStateNotification.waitForApplicationStart(ApplicationStateNotification.java:51)
at io.quarkus.runner.bootstrap.StartupActionImpl.runMainClass(StartupActionImpl.java:122)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:233)
at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:214)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:522)
at io.quarkus.deployment.console.ConsoleStateManager.forceRestart(ConsoleStateManager.java:141)
at io.quarkus.deployment.console.ConsoleStateManager.lambda$installBuiltins$0(ConsoleStateManager.java:98)
at io.quarkus.deployment.console.ConsoleStateManager$1.accept(ConsoleStateManager.java:73)
at io.quarkus.deployment.console.ConsoleStateManager$1.accept(ConsoleStateManager.java:46)
at io.quarkus.deployment.console.AeshConsole.lambda$setup$1(AeshConsole.java:249)
at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:118)
at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:31)
at org.aesh.terminal.io.Decoder.write(Decoder.java:133)
at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:216)
at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:203)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:104)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
... 1 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'void com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7
b49ecb1a_ClientProxy.<init>(org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean)' the class loader io.quarkus.bootstrap.classloading.Q
uarkusClassLoader @73843e83 of the current class, org/acme/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean, and the class loader io.quarkus
.bootstrap.classloading.QuarkusClassLoader @4461c7e3 for the method's defining class, com/acme/spi/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb
1a_ClientProxy, have different Class objects for the type org/acme/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean used in the signature (o
rg.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader
@73843e83, parent loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3; com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b4
9ecb1a_ClientProxy is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3, parent loader 'app')
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.proxy(Unknown Source)
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:101)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:18)
at org.acme.ConfigurationValidator_ClientProxy.arc$delegate(Unknown Source)
at org.acme.ConfigurationValidator_ClientProxy.arc_contextualInstance(Unknown Source)
at org.acme.ConfigurationValidator_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(Unknown Source)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:320)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:302)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:73)
at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
... 13 more
2022-01-25 09:30:48,243 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (Aesh InputStream Reader) Live reload total time: 1.817s
Describe the bug
I have following structure in my reproducer project:
External dependency:
Quarkus project:
On first quarkus:dev, this app starts flawlessly.
If I now hot reload, I get the exception from below.
This only happens with 2.7.0.CR1.
With 2.6.3.Final, this exception did not happen.
Expected behavior
No exceptions when hot reloading, like in 2.6.3.Final
Actual behavior
How to Reproduce?
Download the reproducer:
hot-reload-reproducer-spi.zip
cd spi
mvn clean install
cd ../hot-reload-producer
mvn clean compile quarkus:dev
press s for a force restart
exception form above happens. The same exception happens on a normal hot reload as well.
downgrade to 2.6.3.Final, and start again
No exception on force restart
Output of
uname -a
orver
MSYS_NT-10.0-19043 NANB7NLNVP2 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys
Output of
java -version
openjdk 17 2021-09-14 OpenJDK Runtime Environment Temurin-17+35 (build 17+35) OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.0.CR1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: C:\eclipse\tools\apache-maven Java version: 17, vendor: Eclipse Adoptium, runtime: C:\eclipse\tools\java\17 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional information
No response
The text was updated successfully, but these errors were encountered: