@@ -124,7 +124,9 @@ private static void removeIfWrongDependency(Logger LOGGER, MutableGraph<PluginDe
124124 LOGGER .error ("Provider {} disabled: no provider found for @Inject(\" {}\" )" , thisProvider .name (), otherProviderName );
125125 toRemove .add (thisProvider );
126126 } else if (!enabled (otherProvider )) {
127- LOGGER .error ("Provider {} disabled: the provider for @Inject(\" {}\" ) is disabled" , thisProvider .name (), otherProvider .name ());
127+ // Provider exists but is disabled — expected when plugins
128+ // are compiled into the native image but not enabled via config
129+ LOGGER .debug ("Provider {} disabled: the provider for @Inject(\" {}\" ) is disabled" , thisProvider .name (), otherProvider .name ());
128130 toRemove .add (thisProvider );
129131 } else {
130132 // check provided class vs annotated class
@@ -287,7 +289,15 @@ static boolean checkDependencies(Logger LOGGER, Set<PluginDescriptor> validProvi
287289 var _provider = validProviders .stream ().filter (p -> p .name ().equals (providerName )).findFirst ();
288290
289291 if (_provider .isEmpty ()) {
290- LOGGER .error ("Plugin {} disabled: no provider found for @Inject(\" {}\" )" , plugin .name (), providerName );
292+ // Check if the provider exists in the full list but is disabled.
293+ // In native images, plugins with enabledByDefault=false are compiled
294+ // in (build-time override) but disabled at runtime via config.
295+ var allProvider = providerDescriptorFromName (providerName );
296+ if (allProvider != null && !enabled (allProvider )) {
297+ LOGGER .debug ("Plugin {} disabled: the provider for @Inject(\" {}\" ) is disabled" , plugin .name (), providerName );
298+ } else {
299+ LOGGER .error ("Plugin {} disabled: no provider found for @Inject(\" {}\" )" , plugin .name (), providerName );
300+ }
291301 ret = false ;
292302 } else if (_provider .get ().clazz ().equals (plugin .clazz ())) {
293303 LOGGER .error ("Provider {} disabled: it depends on itself via @Inject(\" {}\" )" , plugin .name (), providerName );
0 commit comments