quarkus
quarkus copied to clipboard
Single quotes in application.properties lead to unrelated error message
Describe the bug
When starting or building the quarkus application, while the application.properties
contain a value which has only one quote "
in it, the build fails with an unrelated error message, stating that a worker couldn't be loaded.
In my example I put this into the application.properties
:
quarkus.log.level = INFO"
The error occurs only on Windows. On macOS or in the WSL the error message is as expected.
Expected behavior
An error describing that the application properties are malformed would be raised.
This is the expected error message (from WSL with Ubuntu):
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Task :quarkusAppPartsBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':quarkusAppPartsBuild'.
> There was a failure while executing work items
> A failure occurred while executing io.quarkus.gradle.tasks.worker.BuildWorker
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: SRCFG00039: The config property quarkus.log.level with the config value "INFO"" threw an Exception whilst being converted Unknown level "INFO""
at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:139)
at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:78)
at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:57)
at io.quarkus.deployment.logging.LoggingResourceProcessor.setupLoggingRuntimeInit(LoggingResourceProcessor.java:297)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)
Caused by: java.lang.IllegalArgumentException: SRCFG00039: The config property quarkus.log.level with the config value "INFO"" threw an Exception whilst being converted Unknown level "INFO""
at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:421)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:380)
at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:469)
at io.quarkus.runtime.configuration.ConfigInstantiator.handleObject(ConfigInstantiator.java:126)
... 13 more
Caused by: java.lang.IllegalArgumentException: Unknown level "INFO""
at org.jboss.logmanager.LogContext.getLevelForName(LogContext.java:359)
at io.quarkus.runtime.logging.LevelConverter.convert(LevelConverter.java:26)
at io.quarkus.runtime.logging.LevelConverter.convert(LevelConverter.java:17)
at io.smallrye.config.Converters$OptionalConverter.convert(Converters.java:844)
at io.smallrye.config.Converters$OptionalConverter.convert(Converters.java:825)
at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:419)
... 16 more
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 16s
6 actionable tasks: 1 executed, 5 up-to-date
Actual behavior
This error is thrown. I added translations to the German parts.
Starting a Gradle Daemon, 3 stopped Daemons could not be reused, use --status for details
> Task :quarkusGenerateCode
Fehler: Hauptklasse Worker konnte nicht gefunden oder geladen werden -> Error: Mainclass Worker could not be found or loaded
Ursache: java.lang.ClassNotFoundException: Worker -> Cause: java.lang.ClassNotFoundException: Worker
Could not write standard input to Gradle Worker Daemon 1.
java.io.IOException: Die Pipe wird gerade geschlossen -> The pipe is being closed
at java.base/java.io.FileOutputStream.writeBytes(Native Method)
at java.base/java.io.FileOutputStream.write(FileOutputStream.java:367)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:125)
at java.base/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:252)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:240)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.writeBuffer(ExecOutputHandleRunner.java:98)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:85)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:64)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
> Task :quarkusGenerateCode FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':quarkusGenerateCode'.
> There was a failure while executing work items
> A failure occurred while executing io.quarkus.gradle.tasks.worker.CodeGenWorker
> Failed to run Gradle Worker Daemon
> Process 'Gradle Worker Daemon 1' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1m 32s
2 actionable tasks: 2 executed
How to Reproduce?
- Checkout https://github.com/c15yi/quarkus-reproducer/tree/faulty-properties
- Run
./gradlew assemble
Output of uname -a
or ver
Microsoft Windows [Version 10.0.22631.3880]
Output of java -version
openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)
Quarkus version or git rev
3.13.0
Build tool (ie. output of mvnw --version
or gradlew --version
)
------------------------------------------------------------ Gradle 8.8 ------------------------------------------------------------ Build time: 2024-05-31 21:46:56 UTC Revision: 4bd1b3d3fc3f31db5a26eecb416a165b8cc36082 Kotlin: 1.9.22 Groovy: 3.0.21 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.3 (Amazon.com Inc. 21.0.3+9-LTS) OS: Windows 11 10.0 amd64
Additional information
No response