Wildfly 36.0.1/37.0.0: Bootable jar with microprofile-reactive-messaging-kafka deployment error

73 views
Skip to first unread message

ralfbat...@gmail.com

unread,
Aug 9, 2025, 7:20:29 AMAug 9
to WildFly
Dear Wildfly Team

I tried to add the microprofile-reactive-messaging-kafka extension into your bootable jar based application. But I am getting these errors:

Weld complains this:  WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers

12:40:37,420 INFO  [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000141: Falling back to the default observer method resolver due to [BackedAnnotatedMethod] io.smallrye.reactive.messaging.providers.extension.ReactiveMessagingExtension.processEmitterFactories(@Observes @WithAnnotations ProcessAnnotatedType<T extends EmitterFactory<?>>)
12:40:37,462 INFO  [io.smallrye.faulttolerance] (MSC service thread 1-2) SRFTL00001: MicroProfile: Fault Tolerance activated (SmallRye Fault Tolerance version: 6.9.1)
12:40:38,075 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 10) WELD-000119: Not generating any bean definitions from io.smallrye.reactive.messaging.providers.metrics.MetricDecorator because of underlying class loading error: Type org.eclipse.microprofile.metrics.MetricRegistry from [Module "io.smallrye.reactive.messaging" version 4.25.0 from local module loader @4ec4f3a0 (finder: local module finder @223191a6 (roots: C:\Develop\gitlab\ptp-rno\source\rno\rno-module-ear-prod-business\.\tmp-test-backend\modules,C:\Develop\gitlab\ptp-rno\source\rno\rno-module-ear-prod-business\.\tmp-test-backend\modules\system\layers\base))] not found.  If this is unexpected, enable DEBUG logging to see the full error.
12:40:38,075 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 12) WELD-000119: Not generating any bean definitions from io.smallrye.reactive.messaging.providers.metrics.MicrometerDecorator because of underlying class loading error: Type io.micrometer.core.instrument.Counter from [Module "io.smallrye.reactive.messaging" version 4.25.0 from local module loader @4ec4f3a0 (finder: local module finder @223191a6 (roots: C:\Develop\gitlab\ptp-rno\source\rno\rno-module-ear-prod-business\.\tmp-test-backend\modules,C:\Develop\gitlab\ptp-rno\source\rno\rno-module-ear-prod-business\.\tmp-test-backend\modules\system\layers\base))] not found.  If this is unexpected, enable DEBUG logging to see the full error.
12:40:39,564 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."rno-prod-business.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."rno-prod-business.ear".WeldStartService: Failed to start service
        at org.jb...@1.5.6.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1545)
        at org.jb...@1.5.6.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1374)
        at org.jbos...@3.9.1//org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jbos...@3.9.1//org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
        at org.jbos...@3.9.1//org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
        at org.jbos...@3.9.1//org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)
        at org.jbos...@3.9.1//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:38)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:506)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:94)
        at org.jbos...@37.0.0.Final//org.jboss.as.weld.WeldStartService.start(WeldStartService.java:81)
        at org.jb...@1.5.6.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1553)
        at org.jb...@1.5.6.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1516)
        ... 7 more
Caused by: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers
        at org.jboss...@5.1.6.Final//org.jboss.weld.bean.builtin.InstanceImpl.checkBeanResolved(InstanceImpl.java:254)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:115)
        at io.smallrye.rea...@4.25.0//io.smallrye.reactive.messaging.providers.extension.ReactiveMessagingExtension.configureMediatorManager(ReactiveMessagingExtension.java:115)
        at io.smallrye.rea...@4.25.0//io.smallrye.reactive.messaging.providers.extension.ReactiveMessagingExtension.afterDeploymentValidation(ReactiveMessagingExtension.java:109)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.jboss...@5.1.6.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:99)
        at org.jboss...@5.1.6.Final//org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:199)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:350)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:136)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:328)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:298)
        at jakarta.enterprise.api//jakarta.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:142)
        at org.jboss...@5.1.6.Final//org.jboss.weld.util.Observers.notify(Observers.java:176)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:307)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:293)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:185)
        at org.jboss...@5.1.6.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:179)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
        at org.jboss...@5.1.6.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35)
        ... 13 more

12:40:39,610 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "rno-prod-business.ear")]) - Stage: (VERIFY) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"rno-prod-business.ear\".WeldStartService" => "Failed to start service

    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers
    Caused by: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers  "}}
12:40:39,612 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "rno-prod-business.ear" (runtime-name : "rno-prod-business.ear")
12:40:39,615 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."rno-prod-business.ear".WeldStartService: Failed to start service
WFLYCTL0448: 145 additional services are down due to their dependencies being missing or failed

The bootable jar is created like this:
<plugin
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>5.1.3.Final</version>
    <configuration>
       <feature-packs>
          <feature-pack>
             <groupId>org.wildfly</groupId>
             <artifactId>wildfly-galleon-pack</artifactId>
             <version>37.0.0.Final</version>
          </feature-pack>
       </feature-packs>
       <layers>
          <layer>jaxrs-server</layer>
          <layer>ee-core-profile-server</layer>
          <layer>ee</layer>
          <layer>ejb</layer>
          <layer>jaxrs</layer>
          <layer>batch-jberet</layer>
          <layer>logging</layer>
          <layer>mail</layer>
          <layer>datasources</layer>
          <layer>jmx</layer>
          <layer>micrometer</layer>
          <layer>microprofile-platform</layer>
          <layer>microprofile-reactive-messaging</layer>
          <layer>microprofile-reactive-messaging-kafka</layer>
          <layer>web-server</layer>
          <layer>core-tools</layer>
          <layer>h2-datasource</layer>                        
       </layers>
       <bootableJar>true</bootableJar>
       <skipDeployment>true</skipDeployment>-->
    </configuration>
   <executions>
      <execution>
         <goals>
             <goal>package</goal>
         </goals>
      </execution>
   </executions>
</plugin>

I looked at the quickstart example, and that one doesn't show this error (it uses provisioning for creating the bootable jar).

Any idea what is wrong?

Best Regards,
Ralf

Kabir Khan

unread,
Aug 26, 2025, 9:23:43 AMAug 26
to ralfbat...@gmail.com, WildFly
Hi,

I have been away for a few weeks. Are you still having this problem?

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wildfly/bf6178d0-bdce-489b-8284-911c1d1ab44an%40googlegroups.com.

ralfbat...@gmail.com

unread,
Aug 28, 2025, 4:25:32 AMAug 28
to WildFly
Hi Kabir

Thank you for coming back to this. I gave another try but I get the same errors:

Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001334: Unsatisfied dependencies for type MediatorManager with qualifiers

May these two log line indicate the issue:
10:12:01,274 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 11) WELD-000119: Not generating any bean definitions from io.smallrye.reactive.messaging.providers.metrics.MicrometerDecorator because of underlying class loading error: Type io.micrometer.core.instrument.Counter from [Module "io.smallrye.reactive.messaging" version 4.25.0 from local module loader @34e9fd99 (finder: local module finder @3c41ed1d (roots: C:\Users\tkba2\AppData\Local\Temp\wildfly-bootable-server2190607916954613307\modules,C:\Users\tkba2\AppData\Local\Temp\wildfly-bootable-server2190607916954613307\modules\system\layers\base))] not found.  If this is unexpected, enable DEBUG logging to see the full error.
10:12:01,277 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 20) WELD-000119: Not generating any bean definitions from io.smallrye.reactive.messaging.providers.metrics.MetricDecorator because of underlying class loading error: Type org.eclipse.microprofile.metrics.MetricRegistry from [Module "io.smallrye.reactive.messaging" version 4.25.0 from local module loader @34e9fd99 (finder: local module finder @3c41ed1d (roots: C:\Users\tkba2\AppData\Local\Temp\wildfly-bootable-server2190607916954613307\modules,C:\Users\tkba2\AppData\Local\Temp\wildfly-bootable-server2190607916954613307\modules\system\layers\base))] not found.  If this is unexpected, enable DEBUG logging to see the full error.

Regards, Ralf

Kabir Khan

unread,
Aug 28, 2025, 6:17:54 AMAug 28
to ralfbat...@gmail.com, WildFly
Hi,

No, those two log lines are just warnings. SmallRye Reactive Messaging has those two decorators to publish metrics. But if their dependencies are not present we don't publish anything, and just get those (slightly annoying) messages.

Is your application working fine apart from that?

Thanks,

Kabir

Kabir Khan

unread,
Aug 28, 2025, 6:19:57 AMAug 28
to ralfbat...@gmail.com, WildFly
On Thu, Aug 28, 2025 at 12:17 PM Kabir Khan <kk...@redhat.com> wrote:
Hi,

No, those two log lines are just warnings. SmallRye Reactive Messaging has those two decorators to publish metrics. But if their dependencies are not present we don't publish anything, and just get those (slightly annoying) messages.

Is your application working fine apart from that?
Never mind, I read the rest of the original post. I'll look a bit more at it :-) 

ralfbat...@gmail.com

unread,
Aug 28, 2025, 6:30:37 AMAug 28
to WildFly
Yes, the application works fine, until during the deployment, specific reactive messaging code is detected. The application itself is an ear deployment. When I provisioning another application, which is a war deployment, then it all is fine.
Both apps are based on bootable jar. So:
  • Failing app doesn't use glow, it specifies the layers directly, and its an ear deployment
  • Running app uses glow with addons, and its an war deployment
I am not sure if that helps.

Thanks anyway for helping
Ralf 

Kabir Khan

unread,
Aug 28, 2025, 6:53:46 AMAug 28
to ralfbat...@gmail.com, WildFly
Ah .ear files might be problematic. Although they MIGHT work, we don't make any guarantees about using MicroProfile in .ear deployments. The MicroProfile specifications don't define anything beyond simple .war files.

We investigated a bit a few months ago to see if we could do better than that, and support .ear files, but it became very complex very quickly, and .ear files can be configured to have different classloading rules, and defaults change between servers. So we are waiting to do that until ear support becomes formalised (if ever).


This one deploys an ear. The ear contains a war exchanging messages with AMQP, and one exchanging messages with Kafka, and we make sure that each deployment works. I think the key is that each .war has its own microprofile-config.properties which is visible to itself but not to the other. 

So if you are not able to use a plain .war, maybe see if you can rework to something similar to what I have done in the above test.

I don't think the Glow vs not using Glow is anything to worry about. If we didn't have everything we need provisioned we would probably see some other errors.

HTH!

ralfbat...@gmail.com

unread,
Aug 28, 2025, 7:23:03 AMAug 28
to WildFly
Thanks for this information.  I didn't know that ear deployments are not officially supported by microprofile.

I will give a try to redesign the app, moving this part to an own war with own microprofile-config.properties.

Best Regards,
Ralf

ralfbat...@gmail.com

unread,
Aug 29, 2025, 6:25:26 AMAug 29
to WildFly
Hi Kabir, thanks again for pointing me to the right direction.

I ended up within the same bootable jar deployment:
  • Ear deployment (with the business code)
  • War deployment (with the kafka reactive messaging)
  • Bridging between the two deployments is based on old EJB remote lookups using the global namespace. I couldn't make to work the 'outside deployment' CDI bean feature as new for CDI 4.0
  • Both deployments share a common library defining the interface which the remote ejb bean implements.
May this helps for others who wants to use reactive messaging with ear deployments. All works fine using war deployments for the reactive messaging. Any tries to include it into the ear failed.

Best Regards,
Ralf

Reply all
Reply to author
Forward
0 new messages