-
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
Getting configMapping with ConfigProvider or Arc in a forkjoinpool causes QuarkusConfigFactory not a subtype exception #24896
Comments
It seems that the I think that you'll need to capture the thread context class loader in the scheduled method ( CC @radcortez |
Thanks for your reply. In my real world app, I am using In the case of the parallelStream, I am no sure how to use |
This is related with: It should work. That exception means that a My recommendation is to just retrieve the configuration value before and just pass down the value, or you need to make sure to get the correct ClassLoader as stated by @mkouba |
Just to add that using My recommendation is to specify the |
Hi @manofthepeace. I encountered similar issue when running |
@andreas-trvlk The easiest is to use quarkus' own
then you can use something like this;
Please note the |
Describe the bug
I have closed #24276 since it was getting clogged with only stacktraces and no traction. Sorry for the noise, I am reopening here with a proper reproducer in the hope some light can be shed on that.
When using Arc.container, or ConfigProvider, to fetch a configMapping in a non cdi bean, causes the following exception;
Caused by: java.util.ServiceConfigurationError: io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
Expected behavior
It should work and not cause any sort of exception
Actual behavior
Exception happens
How to Reproduce?
Reproducer; https://github.com/manofthepeace/quarkus-config-forkjoinpool
Steps to reproduce;
1- mvn quarkus:dev
2- wait 5 sec (a scheduled method will run)
3- In Entity.java the Arc.container() can be uncommented exhibiting similar behaviour.
Output of
uname -a
orver
Darwin Kernel Version 20.6.0
Output of
java -version
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven 3.8.4
Additional information
No response
The text was updated successfully, but these errors were encountered: