简体   繁体   English

使用JExcel API时出现NoSuchMethodError

[英]NoSuchMethodError while using JExcel API

I keep getting the following error while writing to an excel file using JExcel API. 使用JExcel API写入excel文件时,我不断收到以下错误。 Any ideas ? 有任何想法吗 ?

Caused by: java.lang.NoSuchMethodError: jxl.biff.XFRecord$XFType.<init>(Ljxl/biff/XFRecord$1;)V
    at jxl.biff.XFRecord.<clinit>(XFRecord.java:346)
    at jxl.write.WritableWorkbook.<clinit>(WritableWorkbook.java:57)
    at jxl.Workbook.createWorkbook(Workbook.java:411)
    at jxl.Workbook.createWorkbook(Workbook.java:393)
    at controleur.ExportController.exporterFormation(ExportController.java:194)
    at controleur.ExportController.doPost(ExportController.java:106)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
    ... 53 more

Thanks a lot ! 非常感谢 !


Well I switched to Apache POI and it worked perfectly, thanks for the answers though ! 好吧,我切换到了Apache POI,它工作得很好,不过感谢您的回答!

This kind of error usually happens when you have not the same version of the library at runtime as the one used at compile time. 当您在运行时与编译时使用的库版本不相同时,通常会发生这种错误。 Verify which version of JExcel is deployed in your web server. 验证在您的Web服务器中部署了哪个版本的JExcel。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM