ListValuedMap NoClassDefFoundError when Reading Excel using Apache Poi?

一世执手 提交于 2021-02-08 11:22:21

问题


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


回答1:


you should be good if you add the below jar. https://mvnrepository.com/artifact/org.apache.commons/commons-collections4/4.1




回答2:


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.



来源:https://stackoverflow.com/questions/45657641/listvaluedmap-noclassdeffounderror-when-reading-excel-using-apache-poi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!