poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: Android + Proguard + Apache POI
Date Tue, 20 Jun 2017 21:13:18 GMT
Hi,

I found out what the difference in my test-application is. I am setting a
few system properties during startup so that the XML parser is found. It
seems Android handles this somehow differently than normal Java.

System.setProperty("org.apache.poi.javax.xml.stream.XMLInputFactory",
"com.fasterxml.aalto.stax.InputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLOutputFactory",
"com.fasterxml.aalto.stax.OutputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLEventFactory",
"com.fasterxml.aalto.stax.EventFactoryImpl");

See the updated README at https://github.com/centic9/poi-on-android/ for
more details.

Thanks... Dominik.

On Mon, Jun 12, 2017 at 4:38 PM, Delphian <delphian@tut.by> wrote:

> Dominik, thank you. I created an empty project and added poishadow-all.jar,
> but when I start excel operation (without proguard) I caught the error:
>
> / org.apache.poi.javax.xml.stream.FactoryConfigurationError: Provider
> com.bea.xml.stream.EventFactory not found
>
> at
> org.apache.poi.javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.
> java:72)
>
> at
> org.apache.poi.javax.xml.stream.FactoryFinder.find(FactoryFinder.java:178)
>
> at org.apache.poi.javax.xml.stream.FactoryFinder.find(
> FactoryFinder.java:92)
>
> at
> org.apache.poi.javax.xml.stream.XMLEventFactory.
> newInstance(XMLEventFactory.java:30)
>
> at
> org.apache.poi.openxml4j.opc.internal.marshallers.
> PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:41)
>
> at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:161)
>
> at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:141)
>
> at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:72)
>
> at org.apache.poi.openxml4j.opc.OPCPackage.create(OPCPackage.java:394)
>
> at
> org.apache.poi.xssf.usermodel.XSSFWorkbook.newPackage(
> XSSFWorkbook.java:475)
>
> at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(
> XSSFWorkbook.java:243)
>
> at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(
> XSSFWorkbook.java:235)
>
> at
> org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(SXSSFWorkbook.java:240)
>
> at
> org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(SXSSFWorkbook.java:210)
>
> at
> org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(SXSSFWorkbook.java:185)
>
> at
> org.apache.poi.xssf.streaming.SXSSFWorkbook.<init>(SXSSFWorkbook.java:271)
>
> at
> com.che.apachepoicentic.ExcelInteraction.writeSheet(
> ExcelInteraction.java:52)
>
> at
> com.che.apachepoicentic.ExcelInteraction.onHandleIntent(
> ExcelInteraction.java:32)
>
> at
> android.app.IntentService$ServiceHandler.handleMessage(
> IntentService.java:66)
>
> at android.os.Handler.dispatchMessage(Handler.java:102)
>
> at android.os.Looper.loop(Looper.java:148)
>
> at android.os.HandlerThread.run(HandlerThread.java:61)/
>
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.
> nabble.com/Android-Proguard-Apache-POI-tp5727688p5727744.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message