Skip to content

Conversation

@slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented Sep 12, 2022

JIRA: YARN-11301. Fix NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory after YARN-11269.

After the Apache Hadoop YARN Timeline Plugin Storage module was upgraded from junit 4 to 5(#4771), a compilation error occurred.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:
test (default-test) on project hadoop-yarn-server-timeline-pluginstorage: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test failed: java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory: org.junit.platform.launcher.core.LauncherFactory -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException 

@slfan1989
Copy link
Contributor Author

slfan1989 commented Sep 12, 2022

@aajisaka @ashutoshcipher Can you help review the code? I found this kind of maven compilation error prompt from the test report.

PR-4858:
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4858/8/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn.txt

PR-4846:
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4846/17/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn.txt

@ashutoshcipher Should we add this dependency to all modules ready to upgrade junit 4 to 5?

<dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <scope>test</scope>
</dependency>

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 0s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 42m 1s trunk passed
+1 💚 compile 0m 35s trunk passed with JDK Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 31s trunk passed with JDK Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
+1 💚 mvnsite 0m 37s trunk passed
+1 💚 javadoc 0m 40s trunk passed with JDK Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 30s trunk passed with JDK Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 67m 28s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 23s the patch passed
+1 💚 compile 0m 24s the patch passed with JDK Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 24s the patch passed
+1 💚 compile 0m 22s the patch passed with JDK Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
+1 💚 javac 0m 22s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 javadoc 0m 21s the patch passed with JDK Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 19s the patch passed with JDK Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 24m 35s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 6m 2s hadoop-yarn-server-timeline-pluginstorage in the patch passed.
+1 💚 asflicense 0m 41s The patch does not generate ASF License warnings.
102m 47s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4878/1/artifact/out/Dockerfile
GITHUB PR #4878
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux acdf1be25e49 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 024f85e
Default Java Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4878/1/testReport/
Max. process+thread count 607 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4878/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hotcodemacha
Copy link
Contributor

hotcodemacha commented Sep 12, 2022

Thanks @slfan1989. This #4771 was merged before @aajisaka and me decided to add junit-platform-launcher for each future PR in https://issues.apache.org/jira/browse/YARN-6939.

All the current open PRs related to Junit Upgrade do contain junit-platform-launcher as dependency and I will continue to add for new ones as well.

@slfan1989
Copy link
Contributor Author

Thanks @slfan1989. This #4771 was merged before @aajisaka and me decided to add junit-platform-launcher for each future PR in https://issues.apache.org/jira/browse/YARN-6939.

All the current open PRs related to Junit Upgrade do contain junit-platform-launcher as dependency and I will continue to add for new ones as well.

@ashutoshcipher Thanks for your help reviewing the code!
@aajisaka Can you help merge this pr into trunk branch? Thank you very much!

@slfan1989 slfan1989 changed the title YARN-11301. Fix NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory after YARN-11269 YARN-11301. Fix NoClassDefFoundError after YARN-11269(#4771). Sep 13, 2022
Copy link
Member

@aajisaka aajisaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @slfan1989 and @ashutoshcipher

@aajisaka aajisaka merged commit 88545a8 into apache:trunk Sep 13, 2022
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
…e/LauncherFactory after YARN-11269. (apache#4878)

Signed-off-by: Akira Ajisaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants