java 使用 Apache Poi 读取 Excel 时出现 ListValuedMap NoClassDefFoundError?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45657641/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 08:49:45  来源:igfitidea点击:

ListValuedMap NoClassDefFoundError when Reading Excel using Apache Poi?

javanoclassdeffounderror

提问by vamshi

While Executing the Program, Below are the issues Compiler is throwing

在执行程序时,以下是编译器抛出的问题

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/commons/collections4/ListValuedMap
at ReadExcel.main(ReadExcel.java:19)
Caused by: java.lang.ClassNotFoundException: 
org.apache.commons.collections4.ListValuedMap
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more

Please help me know how to solve this Thanks in advance

请帮我知道如何解决这个提前谢谢

回答by kattoor

回答by Jason J

You are missing some required class maybe check your version on pom.xml if you are using eclipse you can do cnt shift T and see if you can open the missing class (ListValuedMap)file and see if it comes from the same jar as you specified in your pom.

您缺少一些必需的类,也许在 pom.xml 上检查您的版本,如果您使用的是 eclipse,您可以执行 cnt shift T 并查看您是否可以打开缺少的类 (ListValuedMap) 文件,看看它是否来自您指定的同一个 jar在你的 pom.