-
Notifications
You must be signed in to change notification settings - Fork 580
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
eclipselink cdi with helidon 2.0.1 and custom config not working #2115
Comments
Hello; this problem doesn't have anything to do with Eclipselink, right? Just Secondly, I can't tell from the limited information here whether your |
yes this may not be problem with eclipselink actually not sure as i dont know the details about how config is being used in CDI. below is how i start the server : private static Config buildConfig() { this dosent work but the console shows correct properties. whereas when i add below system properties it works perfectly fine. |
One further question to help me out. Could you see if your |
No , Config.builder().sources(file("conf/config.properties"), I also tried below. with io.helidon.config.Config class. this did print correct values from property file but still got "Internal Exception: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001334: Unsatisfied dependencies for type DataSource with qualifiers " exception. private static Config buildConfig() { |
I apologize; I am still confused by your comment. It appears that you tried the same thing twice. Could you please provide a reproducer? Note that the JPA integration makes use of (Finally, the most portable (from a MicroProfile perspective) solution is not to use this programmatic setup at all, but to write a |
Notes to myself. We are indeed turning a Helidon …and the call to …and an …and we are indeed registering the MicroProfile Config …so offhand I would think that a subsequent call to |
Hi @ljnelson sorry for confusion i just updated the comment #2115 (comment) Also to confirm, using both org.eclipse.microprofile.config.Config and io.helidon.config.Config I am able to get the correct values. |
Assuming you're right, then, the problem will lie in |
(More notes to myself.) This excerpt from an exploratory test case I'm writing emulates what's going on when you build the server in the way that you've described, and the JPA extension subsequently calls
The final assertion fails (my assumption), suggesting that something about Helidon's implementation of {time passes} See here: That would suggest to me that |
(More notes.) While my assertion above naively should hold, there is apparently no explicit requirement that it do so. Moving on to explore how these two different MicroProfile |
Both objects do in fact return values from |
Thinking now that perhaps this is at fault: Line 64 may be too early for the Helidon MicroProfile Config implementation, i.e. depending on the order in which CDI decides to instantiate portable extensions this one might be instantiated before others that have a role in making the built |
Moving this later results in a
Still digging. |
Environment Details
*Helidon MP
Problem Description
I am using ecpliselink cdi in our project when I upgraded from 1.4.4 to 2.0.1 it started throwing below error
Internal Exception: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001334: Unsatisfied dependencies for type DataSource with qualifiers @default @nAmed
in my project I am using custom file configuration. (all the configuration regarding DB i.e. javax.sql.DataSource.* is in config.properties)
Config.builder().sources(file("conf/config.properties"),
classpath("META-INF/microprofile-config.properties")).build();
When i moved javax.sql.DataSource.* properties to microprofile-config.properties it works fine.
Is there anything I am doing wrong or is this regression ?
I am following below documents for custom configuration. https://helidon.io/docs/v2/#/mp/guides/03_config#config/06_advanced-configuration.adoc
and https://helidon.io/docs/v2/#/mp/guides/15_migration for migration.
Thanks,
Bhushan.
The text was updated successfully, but these errors were encountered: