[英]java.lang.NoSuchMethodError: org.apache.poi.util.IOUtils.copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
I have program that use Apache poi 3.5 我有使用Apache poi 3.5的程序
public void UploadXLSX(File file, FileType fileType)
{
XSSFWorkbook workbook = null;
XSSFSheet sheet = null;
StringBuilder query = new StringBuilder();
try {
workbook = new XSSFWorkbook(new FileInputStream(file));
sheet = workbook.getSheetAt(0);
System.out
.println("sheet.getLastRowNum() : " + sheet.getLastRowNum()
+ " First" + sheet.getFirstRowNum());
XSSFRow row; // = sheet.getRow(2); // third row
XSSFCell cell;// = row.getCell((short)3); // fourth cell
The application throw exception 应用程序抛出异常
java.lang.NoSuchMethodError: org.apache.poi.util.IOUtils.copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
any advice to how slove the exception 有关如何解决异常的任何建议
Looks like there also is an earlier version of POI on the classpath in which that method did not exist yet. 看起来在类路径上还存在早期版本的POI,其中该方法尚不存在。
See if it helps - http://poi.apache.org/faq.html#faq-N10006 看看它是否有帮助 - http://poi.apache.org/faq.html#faq-N10006
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.