HealthCheck NoClassDefFoundError on WF 24

25 views
Skip to first unread message

Claudio Weiler

unread,
Sep 10, 2021, 11:46:27 AM9/10/21
to WildFly
Hi,

In WildFly 24 I can't use health probes (@Readiness, @Liveness) because of class loading issue with interface org.eclipse.microprofile.health.HealthCheck.

I receive a java.lang.NoClassDefFoundError.

Background:
- It works on WildFly 21;
- Using standalone.xml;

A try adding extension org.wildfly.extension.microprofile.health-smallrye without change.

Found this page: https://www.wildfly.org/news/2021/01/13/WildFly22-Final-Released/ with this note: "The MicroProfile Health and Metrics subsystems now require the presence in the config of the base health and base metrics subsystems. Users migrating from WildFly 21 or earlier should add these new extensions/subsystems to their configuration", but I don't understand what it means.

Any help apreciated, thanks!

Claudio Weiler

Emmanuel Hugonnet

unread,
Sep 13, 2021, 3:39:58 AM9/13/21
to Claudio Weiler, WildFly
It means that you are not using :
        <extension module="org.wildfly.extension.microprofile.health-smallrye"/>
<subsystem xmlns="urn:wildfly:microprofile-health-smallrye:2.0" security-enabled="false"
empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}"
empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}"/>
Take a look at standalone-microprofile.xml

Cheers,
Emmanuel

Le 10/09/2021 à 17:46, Claudio Weiler a écrit :
> Hi,
>
> In WildFly 24 I can't use health probes (@Readiness, @Liveness) because of class loading issue with interface
> *org.eclipse.microprofile.health.HealthCheck*.
>
> I receive a *java.lang.NoClassDefFoundError*.
>
> Background:
> - It works on WildFly 21;
> - Using standalone.xml;
>
> A try adding extension *org.wildfly.extension.microprofile.health-smallrye* without change.
>
> Found this page: https://www.wildfly.org/news/2021/01/13/WildFly22-Final-Released/ with this note: "/The MicroProfile Health and Metrics
> subsystems now require the presence in the config of the base health and base metrics subsystems. Users migrating from WildFly 21 or
> earlier should add these new extensions/subsystems to their configuration/", but I don't understand what it means.
>
> Any help apreciated, thanks!
>
> Claudio Weiler
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/wildfly/265506e5-4688-442a-a8c8-116dc37e0d37n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/265506e5-4688-442a-a8c8-116dc37e0d37n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Claudio Weiler

unread,
Sep 13, 2021, 1:10:22 PM9/13/21
to WildFly
Thanks Emmanuel!

The subsystem snippet was the issue.
Reply all
Reply to author
Forward
0 new messages