问题
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