abdelhady
abdelhady

Reputation: 560

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

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

Upvotes: 1

Views: 8648

Answers (1)

Vivek Vermani
Vivek Vermani

Reputation: 2014

Looks like there also is an earlier version of POI on the classpath in which that method did not exist yet.

See if it helps - http://poi.apache.org/faq.html#faq-N10006

Upvotes: 3

Related Questions