Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fsimage-generator crashing with "NoClassDefFoundError: org.mockito.stubbing.Answer" #237

Closed
marcelmay opened this issue Aug 29, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@marcelmay
Copy link
Owner

It seems Hadoop MiniDFSCluster has now a required (but not transitively propagated) runtime dependency on Mockito:

java -Ddfs.image.compress=false -jar target/hfsa-fsimage-generator-*.jar

2024-08-29 14:52:32,801 INFO  FsImageGenerator  - Max depth = 5, max width = 2, files-factor = 10
2024-08-29 14:52:32,801 INFO  FsImageGenerator  - Generates 806 dirs (depth up to 5) and 209560 files
2024-08-29 14:52:32,817 INFO  FsImageGenerator  - Enabling compression: false
2024-08-29 14:52:38,714 ERROR DataNode  - Command processor encountered interrupt and exit.
Exception in thread "main" java.lang.NoClassDefFoundError: org/mockito/stubbing/Answer
	at org.apache.hadoop.hdfs.MiniDFSCluster.isNameNodeUp(MiniDFSCluster.java:2705)
	at org.apache.hadoop.hdfs.MiniDFSCluster.isClusterUp(MiniDFSCluster.java:2719)
	at org.apache.hadoop.hdfs.MiniDFSCluster.waitClusterUp(MiniDFSCluster.java:1520)
	at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:999)
	at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:594)
	at org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:533)
	at de.m3y.hadoop.hdfs.hfsa.generator.FsImageGenerator.main(FsImageGenerator.java:66)
Caused by: java.lang.ClassNotFoundException: org.mockito.stubbing.Answer
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 7 more
@marcelmay marcelmay added the bug label Aug 29, 2024
@marcelmay marcelmay added this to the 1.3.11 milestone Aug 29, 2024
@marcelmay marcelmay self-assigned this Aug 29, 2024
marcelmay added a commit that referenced this issue Aug 29, 2024
…o.stubbing.Answer" - update mockito to latest JDK-8-supported version 4.x (fixes #237)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant