Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found

zsousa
Hi All, I am trying to read an .xlsx file, using Groovy but I keep on gett8ing this message
Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found


 XSSFWorkbook wb
 wb = new XSSFWorkbook("Workbook2.xls")


below is my Gradle dependencies

    // https://mvnrepository.com/artifact/org.apache.poi/poi
    compile group: 'org.apache.poi', name: 'poi', version: '3.15'

    // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
    compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.15'

    // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas
    compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: '3.15'


    compile(group: 'org.apache.poi', name : 'poi-ooxml', version: '3.15') {
        exclude group: 'stax', module: 'stax-api'
    }


Reply | Threaded
Open this post in threaded view
|

Re: Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found

Dominik Stadler
Hi,

Are you trying to run the code on Android? If so then please note that
there are a few more problems when you try to make that work, see
https://github.com/centic9/poi-on-android/ for some pre-built shaded jar
which is adjusted to run as part of Android Apps.

If this is not on Android: which Java version do you use and does it work
if you remove the "exclude" of stax-api?

Dominik.


On Tue, Mar 14, 2017 at 2:35 PM, zsousa <[hidden email]> wrote:

> Hi All, I am trying to read an .xlsx file, using Groovy but I keep on
> gett8ing this message
> Caught: javax.xml.stream.FactoryConfigurationError: Provider
> com.bea.xml.stream.EventFactory not found
>
>
>  XSSFWorkbook wb
>  wb = new XSSFWorkbook("Workbook2.xls")
>
>
> below is my Gradle dependencies
>
>     // https://mvnrepository.com/artifact/org.apache.poi/poi
>     compile group: 'org.apache.poi', name: 'poi', version: '3.15'
>
>     // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
>     compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.15'
>
>     // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas
>     compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version:
> '3.15'
>
>
>     compile(group: 'org.apache.poi', name : 'poi-ooxml', version: '3.15') {
>         exclude group: 'stax', module: 'stax-api'
>     }
>
>
>
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.
> nabble.com/Caught-javax-xml-stream-FactoryConfigurationError-
> Provider-com-bea-xml-stream-EventFactory-not-found-tp5726882.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found

zsousa
no not android, just creating  a groovy file that will read in a .xlsx file and run some tests for me.

I am using JDK 8.x
Reply | Threaded
Open this post in threaded view
|

Re: Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found

Dominik Stadler
Hi,

Then please try to not exclude the stax-api and see what happens.

Dominik.

On Thu, Mar 16, 2017 at 5:04 AM, zsousa <[hidden email]> wrote:

> no not android, just creating  a groovy file that will read in a .xlsx file
> and run some tests for me.
>
> I am using JDK 8.x
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.
> nabble.com/Caught-javax-xml-stream-FactoryConfigurationError-
> Provider-com-bea-xml-stream-EventFactory-not-found-tp5726882p5726899.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>