Spring Actuator Changes Upgrading From Spring Boot 2.4.3 to 2.6.2

Viewed 1373

We have a Spring Boot web application developed with Spring Boot 2.4.3 and deploys Spring Actuator. I am investigating upgrading to Spring Boot 2.6.2 and have the majority of the issues working. I removed spring actuator starter from the project and war file and it deploys and runs fine. We are running using Java 11 and Wildfly 18.

If I add the spring actuator starter back into to the project pom file and war file pom files, it shows the following warning during deployment:

16:44:28,063 WARN  [org.jboss.modules.define] (Thread-115) Failed to define class io.micrometer.core.instrument.binder.jersey.server.MetricsApplicationEventListener in Module "deployment.test.war" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link io/micrometer/core/instrument/binder/jersey/server/MetricsApplicationEventListener (Module "deployment.test.war" from Service Module Loader): org/glassfish/jersey/server/monitoring/ApplicationEventListener
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1095)
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
    at org.jboss.modules.Module.loadModuleClass(Module.java:731)
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:398)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition.resolve(FilteringSpringBootCondition.java:108)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition$ClassNameFilter.isPresent(FilteringSpringBootCondition.java:140)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition$ClassNameFilter$2.matches(FilteringSpringBootCondition.java:128)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.OnClassCondition$StandardOutcomesResolver.getOutcome(OnClassCondition.java:227)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.OnClassCondition$StandardOutcomesResolver.getOutcome(OnClassCondition.java:214)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.OnClassCondition$StandardOutcomesResolver.getOutcomes(OnClassCondition.java:201)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.OnClassCondition$StandardOutcomesResolver.resolveOutcomes(OnClassCondition.java:190)
    at deployment.test.war//org.springframework.boot.autoconfigure.condition.OnClassCondition$ThreadedOutcomesResolver.lambda$new$0(OnClassCondition.java:150)
    at java.base/java.lang.Thread.run(Thread.java:834)

I went down the path of trying to add jar files to the project for the missing class, but the problem adds to another missing class file. I could not find any major changes in Spring Actuator between Spring Boot versions 2.4.2 and 2.6.2 that would cause this problem.

Does anyone have any insight into changes in Spring Boot that might cause the deployment issue?

0 Answers
Related