Open
Description
openedon Sep 19, 2024
Description
While creating (see this PR for more context - quarkusio/quarkus-workshops#600), I noticed that the following error is thrown when the @ConfigMapping
phase is set to RUN_TIME:
Caused by: java.lang.ClassNotFoundException: io.quarkus.workshop.superheroes.version.deployment.VersionConfig
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:533)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:481)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:533)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:481)
at io.quarkus.runtime.configuration.AbstractConfigBuilder.withMapping(AbstractConfigBuilder.java:64)
... 21 more
The solution was to move the @ConfigMapping
to the runtime
module, but the error message is a bit cryptic.
- Zulip thread: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Workshop/near/471292983
Implementation ideas
It would be nice if we could detect that somehow and display a nicer error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment