-
Notifications
You must be signed in to change notification settings - Fork 566
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
NullPointerException in MetaConfigFinder in CDI situations #2207
Comments
(Notes to self.)
Then, during portable extension time, 💡 or it may be that…Weld deploys beans via the fork/join pool. It may be that a fork/join thread does not have a context classloader? Hmm. {time passes} See https://bugs.openjdk.java.net/browse/JDK-8184335 for reference. Is the system classloader {time passes} Ah, no, the system classloader is set just fine. But sure enough, the fork/join pool thread responsible for deploying beans has |
Hmm; my initial impression was that I could somehow {waves hands} just drop in some kind of Or maybe not: See also: And: …which I think will let me plug in my own service. |
I don't want this to get lost; I'm not yet sure what the culprit is.
From within a unit test (in the
datasource-hikaricp
project) that I'm working on, when I do:…this causes the CDI container to start coming up. One of the portable extensions I'm working on (trying to fix #2115) was calling
ConfigProvider.getConfig()
in its constructor, which might be responsible for #2115's issue. I moved this call to effectively be atAfterBeanDiscovery
time and tried this unit test in the Hikari package to make sure I didn't break anything.When I did this and recompiled things and then ran the HikariCP datasource extension's simple unit test, I couldn't get past the
Server.builder()
step, which failed with the following partial (suppressed) stack:The actual error was here:
Calling
ConfigProvider.getConfig()
will be something that users will attempt to do from within their own portable extensions as well.I'm sure I'm making a mistake somewhere but I don't know where or how.
The text was updated successfully, but these errors were encountered: