I am getting following error while running JUnit5 with SpringBoot. Here is the stack trace that I get when I run ./gradlew clean test
:junitPlatformTest Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ReflectionUtil at org.apache.logging.log4j.jul.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:34) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46) at org.apache.logging.log4j.jul.LogManager.getLogger(LogManager.java:89) at java.util.logging.LogManager.demandLogger(LogManager.java:551) at java.util.logging.Logger.demandLogger(Logger.java:455) at java.util.logging.Logger.getLogger(Logger.java:502) at org.junit.platform.commons.logging.LoggerFactory$DelegatingLogger.<init>(LoggerFactory.java:62) at org.junit.platform.commons.logging.LoggerFactory.getLogger(LoggerFactory.java:49) at org.junit.platform.launcher.core.DefaultLauncher.<clinit>(DefaultLauncher.java:44) at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:59) at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:61) at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:57) at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33) at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:57) at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:85) at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:75) at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:48) at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:40) Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.ReflectionUtil at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 18 more The github url for above code is github link