-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure on hot reload [Development environment] #3409
Comments
Installed features: [agroal, cdi, hibernate-orm, hibernate-validator, jdbc-postgresql, narayana-jta, resteasy, resteasy-jsonb, security, smallrye-jwt, smallrye-openapi, swagger-ui, vertx] |
There is something fishy @stuartwdouglas Maybe the reload does not take |
I just ran into this problem as well when starting to test spring MVC annotation support w/PanacheRepository. Reproducer:
|
I can confirm @emmanuelbernard 's suspicion. Hot code replacement works fine when I use the following quarkus.datasource.url=jdbc:h2:mem:default
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=username-default
quarkus.datasource.min-size=3
quarkus.datasource.max-size=13
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.sql-load-script=db/hsqldb/data-and-schema.sql Log file upon code replace:
But when I use configuration profile properties, like so: %dev.quarkus.datasource.url=jdbc:h2:mem:default
%dev.quarkus.datasource.driver=org.h2.Driver
%dev.quarkus.datasource.username=username-default
%dev.quarkus.datasource.min-size=3
%dev.quarkus.datasource.max-size=13
%dev.quarkus.hibernate-orm.database.generation=drop-and-create
%dev.quarkus.hibernate-orm.sql-load-script=db/hsqldb/data-and-schema.sql And try hot code replacement, I hit this bug:
|
The old config provider resolver was not being restored on shutdown, which would cause problems on restarts.
The old config provider resolver was not being restored on shutdown, which would cause problems on restarts.
The old config provider resolver was not being restored on shutdown, which would cause problems on restarts.
The old config provider resolver was not being restored on shutdown, which would cause problems on restarts.
The old config provider resolver was not being restored on shutdown, which would cause problems on restarts.
Bug Description
In the application.properties, I'm using the wildcard to config database user, password, url... for 2 environments (dev, prod)
examples:
%dev.quarkus.datasource.password=xxxxxxxx
%prod.quarkus.datasource.password=xxxxxxxx
In the development environment using
mvnw compile quarkus:dev:
the first build is ok, work's fine .But, when i change any class and try to send a request, the hot reload throws an Exception:
2019-08-02 11:37:49,564 ERROR [io.qua.dev.DevModeMain] (executor-thread-12) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.deployment.steps.ConfigurationSetup#initializeConfiguration threw an exception: java.util.NoSuchElementException: Property quarkus.datasource.password not found at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:141) at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:171) at io.quarkus.dev.DevModeMain.restartApp(DevModeMain.java:198) at io.quarkus.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:109) at io.quarkus.undertow.deployment.devmode.UndertowHotReplacementSetup.handleHotDeploymentRequest(UndertowHotReplacementSetup.java:67) at io.quarkus.undertow.deployment.devmode.UndertowHotReplacementSetup$1$1.handleRequest(UndertowHotReplacementSetup.java:56) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at io.quarkus.runtime.CleanableExecutor$CleaningRunnable.run(CleanableExecutor.java:224) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426) at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29) at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29) at java.lang.Thread.run(Thread.java:745) at org.jboss.threads.JBossThread.run(JBossThread.java:479) Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.deployment.steps.ConfigurationSetup#initializeConfiguration threw an exception: java.util.NoSuchElementException: Property quarkus.datasource.password not found at io.quarkus.builder.Execution.run(Execution.java:108) at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:121) at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:115) at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:107) ... 18 more Caused by: java.util.NoSuchElementException: Property quarkus.datasource.password not found at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:89) at io.quarkus.deployment.steps.ConfigurationSetup.initializeConfiguration(ConfigurationSetup.java:225) 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:483) at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:768) at io.quarkus.builder.BuildContext.run(BuildContext.java:415) at io.quarkus.builder.BuildContext$$Lambda$116/2101929518.run(Unknown Source) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426) ... 2 more
To Reproduce
Steps to reproduce the behavior:
mvnw compile quarkus:dev:
Configuration
**Environment **
My question is:
This is a bug or any new configuration needed ?
The text was updated successfully, but these errors were encountered: