[ https://issues.apache.org/jira/browse/SUREFIRE-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897008#comment-17897008 ]
Michael Osipov commented on SUREFIRE-2285: ------------------------------------------ Why should that be odd? If it is in the tree then you are lost. [~cstamas] > ClassNotFoundException > ----------------------- > > Key: SUREFIRE-2285 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2285 > Project: Maven Surefire > Issue Type: Bug > Components: classloading, Maven Surefire Plugin, Maven Surefire > Report Plugin > Affects Versions: 3.5.2 > Reporter: Dima > Priority: Major > Fix For: waiting-for-feedback > > > Getting an error when running maven build. > Using spring boot, Tried to override with different versions of Surefire > plugin but did not help. > Found a workaround by manually specifying a missing dependency > {code:java} > <dependency> > <groupId>org.apache.maven.surefire</groupId> > <artifactId>common-java5</artifactId> > <version>${maven-surefire-plugin.version}</version> > <scope>test</scope> > </dependency> {code} > {code:java} > # Created at 2024-11-07T19:56:29.078java.lang.NoClassDefFoundError: > org/apache/maven/surefire/report/RunModeSetter at > java.base/java.lang.ClassLoader.defineClass1(Native Method) at > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027) at > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) > at > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) > at > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at > org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:113) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385) > at > org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) > at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) > Caused by: java.lang.ClassNotFoundException: > org.apache.maven.surefire.report.RunModeSetter at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) > ... 14 more > {code} > Also found this thread where people are experiencing the same issue > [https://stackoverflow.com/questions/78726126/noclassdeffounderror-exception-after-updating-to-the-latest-maven-surefire-plugi/79165732#79165732] -- This message was sent by Atlassian Jira (v8.20.10#820010)