Discussion:
Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found
zsousa
2017-03-14 13:35:05 UTC
Permalink
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: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Dominik Stadler
2017-03-14 15:44:24 UTC
Permalink
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.
Post by 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
'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.
---------------------------------------------------------------------
zsousa
2017-03-16 04:04:46 UTC
Permalink
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: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Dominik Stadler
2017-03-16 06:56:29 UTC
Permalink
Hi,

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

Dominik.
Post by 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
--
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.
---------------------------------------------------------------------
Loading...