INFO org.jxls.demo.guide.ObjectCollectionDemo - Running Object Collection demo
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.jxls.util.TransformerFactory.loadPoiTransformer(TransformerFactory.java:85)
at org.jxls.util.TransformerFactory.getTransformerClass(TransformerFactory.java:69)
at org.jxls.util.TransformerFactory.createTransformer(TransformerFactory.java:27)
at org.jxls.util.JxlsHelper.createTransformer(JxlsHelper.java:202)
at org.jxls.util.JxlsHelper.processTemplate(JxlsHelper.java:93)
at org.jxls.demo.guide.ObjectCollectionDemo.main(ObjectCollectionDemo.java:32)
at org.jxls.demo.MainDemo.main(MainDemo.java:20)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
<imgsrc="http://static.oschina.net/uploads/space/2016/0901/180154_hBvq_2315775.png"alt="">jar包版本问题吧
如果使用poi的话,需要至少3.14版本,坑很多,摸索了很久才搞定
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。