Re: NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit

2019-12-14 Thread pj.fanning
The method is here -
https://github.com/apache/xmlbeans/blob/trunk/src/xmlpublic/org/apache/xmlbeans/XmlOptions.java#L881

and appears in xmlbeans 3.1.0.

Maybe you have multiple versions of xmlbeans on your classpath and the older
version is being picked up.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org



Re: NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit

2019-12-14 Thread soma
Hi,

I have xmlbeans 3.1.0 still the issue exists




--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org



Re: NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit

2019-05-16 Thread Dieter
Thanks. I found the old XMLBeans library 



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org



Re: NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit

2019-05-13 Thread Dominik Stadler
Hi,

Sounds like you are using an incorrect version of the XMLBeans library.
Make sure that version 3.1.0 is available and no other version is included
in the classpath.

Dominik.

On Mon, May 13, 2019 at 2:43 PM Dieter  wrote:

> Hello,
> I downloaded poi-bin-4.1.0 and added all jar files including the ones in
> the
> lib folder to my project.
> The code works for xls files, but with xlsx files the following error
> occurs:
>
> Caused by: java.lang.NoSuchMethodError:
>
> org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
> at
> org.apache.poi.ooxml.POIXMLTypeLoader.(POIXMLTypeLoader.java:43)
> at
> org.apache.poi.xssf.model.ThemesTable.(ThemesTable.java:86)
> ... 27 more
>
> Coding sample:
>
> import java.io.*;
> import java.math.BigDecimal;
> import java.util.*;
>
> import org.apache.poi.ss.usermodel.*; // POI 4.x
> import org.apache.poi.hssf.usermodel.HSSFWorkbook;
> import org.apache.poi.poifs.filesystem.POIFSFileSystem;
> import org.apache.poi.xssf.usermodel.XSSFWorkbook;
>
> public void execute() throws Exception {
> String[][] data = new String[1000][1000];
> FileInputStream fis;
> try {
> fis = new
> FileInputStream(Filename.toString());
> } catch (FileNotFoundException e) {
> e.printStackTrace();
> return;
> }
> Workbook wb = null;
>
> try {
>   if
> (Filename.toString().toLowerCase().endsWith(".xls")) {
> wb = new HSSFWorkbook(new
> POIFSFileSystem(fis)); // *.xls
>   } else if
> (Filename.toString().toLowerCase().endsWith(".xlsx")) {
> wb = new XSSFWorkbook(fis); // *.xlsx
>   }
> } catch (IOException e) {
> e.printStackTrace();
> return;
> }
>
> Sheet sheet = wb.getSheetAt(0); // Get Excel Sheet
> // Iterate through each row.
> Iterator rows = sheet.rowIterator();
> while (rows.hasNext()) {
> Row row = (Row) rows.next();
> Iterator cells = row.cellIterator();
> while (cells.hasNext()) {
> Cell cell = (Cell) cells.next();
> String vCellValue =
> cell.toString();
> data[ row.getRowNum() ][
> cell.getColumnIndex() ] = vCellValue;
> }
> }
> }
>
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
>
> -
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>