2017-03-03 210 views
0

I am creating .xlsx file using poi jars which are poi-3.15.jar, poi-ooxml->3.15.jar, poi-ooxml-schemas-3.15.jar, ooxml-schemas-1.3.jar, xml-apis->2.0.2.jar, xbean-2.2.0, xmlschema-1.4.7.jar and commons-collections4-.4.0.jar.>
But still im getting follwoing error.
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.collections4.ListValuedMap
can you please help me to create simple .xlsx file using >XSSFWorkbook class.XSSFWorkbook創建失敗

+0

ListValuedMap異常在從commons-collections4-4.0更改爲commons-collections4-4.1.jar後解決。但現在我得到「XML-BEANS編譯模式:不兼容的次要版本 - 期望高達23,得到24(schemaorg_apache_xmlbeans.system.sF1327CCA741569E70F9CA8C9AF9B44B2.index) - 代碼3」錯誤。你可以請這個幫助... –

回答

1

ListValuedMap包含在此jar中:commons-collections4。您還應該使用Xml Beans 2.3.0或更高版本。

+0

XML-BEANS編譯模式:不兼容的次要版本 - 期待高達23,XML-BEANS編譯模式:不兼容的次要版本 - 期望高達23,得到24(schemaorg_apache_xmlbeans.system.sF1327CCA741569E70F9CA8C9AF9B44B2.index ) - 代碼.......得到這個錯誤。 –

+0

@KVijayBhaskar嘗試添加XMLBeans 2.3或更高版本。 – peterremec

+0

非常感謝你@peterremec。添加xmlbeans 2.3.0版本後,xlsx表格成功創建。 –