Custom Microprofile Config Source WAR / EAR

Skip to first unread message


Jan 3, 2022, 7:19:21 AMJan 3
to SmallRye

I have successfully used a custom Microprofile Config Source inside a WAR file deployed to Wildfly, but when the same WAR is deployed inside an EAR file I get the following error:

Caused by: io.smallrye.config.inject.ConfigException: No Config Value exists for required property dummy
        at io.smallrye.config//io.smallrye.config.inject.ConfigExtension.validate(
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.base/java.lang.reflect.Method.invoke(
        at org.jboss...@3.1.5.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(

I much appreciate any help pointing to whatever is missing in the EAR file. I have tried to debug and it seams SmallRyeConfigProviderResolver is able to pick up the custom config source but for whatever reason it will not be included in the known config sources.

I have attached two files:
  • service-1.0.war - contains a custom config source and a REST webservice where a "dummy" property is injected (made available by the custom config source);
  • custom-config-1.0.ear - an EAR with the the exact same WAR file but in this form it is not able to resolve the "dummy" property.
Wildfly version: 21.0.2.Final


Martin Stefanko

Jan 3, 2022, 9:16:52 AMJan 3
to SmallRye
Hi, I believe this will be a problem in classloading differences between wars and ears in WildFly, not a problem in SmallRye. However, when I tried to deploy your services on WFLY I got the following error: Caused by: java.lang.AbstractMethodError: Receiver class org.example.CustomConfigSource does not define or inherit an implementation of the resolved method 'abstract java.util.Set getPropertyNames()' of interface org.eclipse.microprofile.config.spi.ConfigSource.


Gunnar Hilling

Jan 31, 2022, 4:49:10 AMJan 31
to SmallRye
Isn't this a more general problem? AFAIK Microprofile only defines war-deployments, correct? I have a similar project situation and I'd like to migrate my JEE application to mp (config, health) but ATM this is a dangerous game because it's not sure what is and will be supported.
I'd love to stand corrected, however...
Kind regards,

Martin Stefanko

Jan 31, 2022, 5:47:58 AMJan 31
to SmallRye
Yes, you are correct. MicroProfile is not specifying behavior for EARs. Actually, in the productized version of Wildfly -> EAP, you can only use MicroProfile in the EAP XP (expansion pack) in which EAR packaging is not supported.

Supporting Config or Health in EARs would need to be done with some caveats - However, the issue is still open and on my todo list to check.

Reply all
Reply to author
0 new messages