Discussion:
Urgent:POI4.0.0 causes org.apache.poi.javax.xml.parsers.FactoryConfigurationError
ranzhang35
2018-10-02 16:47:07 UTC
Permalink
I got the following error when 'wb.write(fileOut);' is called using POI4.0.0:

org.apache.poi.javax.xml.parsers.FactoryConfigurationError: Provider for
org.apache.poi.javax.xml.parsers.DocumentBuilderFactory cannot be found
at
org.apache.poi.javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
Source:21)
at
org.apache.poi.ooxml.util.DocumentHelper.<clinit>(DocumentHelper.java:98)
at org.apache.poi.ooxml.util.DocumentHelper.createDocument(Unknown
Source:0)
at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.save(ContentTypeManager.java:428)
at
org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:518)
at
org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1493)
at
org.apache.poi.ooxml.POIXMLDocument.write(POIXMLDocument.java:242)
at
com.example.mkproduct.myapplication2.MainActivity.onCreate(MainActivity.java:126)
at android.app.Activity.performCreate(Activity.java:7258)
at android.app.Activity.performCreate(Activity.java:7249)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1221)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2909)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3041)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6958)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)





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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
pj.fanning
2018-10-02 16:53:27 UTC
Permalink
This issue will be fixed in POI 4.0.1 (fix already committed)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
ranzhang35
2018-10-02 17:05:54 UTC
Permalink
Pj Fanning:

is there any workaround? I simply trying to write the excel data
to a file.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
pj.fanning
2018-10-02 17:22:52 UTC
Permalink
The latest nightly build is at
https://builds.apache.org/view/P/view/POI/job/POI-DSL-1.8/lastSuccessfulBuild/artifact/build/dist/



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
ranzhang35
2018-10-02 17:31:58 UTC
Permalink
pj fanning:

using POI4.0.0, is there a workaround to write the excel data to
file?



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
pj.fanning
2018-10-02 17:35:44 UTC
Permalink
Try adding xercesImpl 2.12.0 jar to your classpath




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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
ranzhang35
2018-10-02 21:05:42 UTC
Permalink
is 4.0.1 tested?? I'm running around the circle, now I'm getting following
error when 'XSSFWorkbook wb = new XSSFWorkbook();' is called using POI
4.0.1.



java.lang.NoSuchMethodError: No static method
newFactory()Lorg/apache/poi/javax/xml/stream/XMLEventFactory



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Jörn Franke
2018-10-02 21:28:26 UTC
Permalink
What is your build file? It looks like libraries are mixed up.
Post by ranzhang35
is 4.0.1 tested?? I'm running around the circle, now I'm getting following
error when 'XSSFWorkbook wb = new XSSFWorkbook();' is called using POI
4.0.1.
java.lang.NoSuchMethodError: No static method
newFactory()Lorg/apache/poi/javax/xml/stream/XMLEventFactory
--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
ranzhang35
2018-10-02 22:46:26 UTC
Permalink
John Franke:

Its too hard to share files here, please email me at rzhang at
mkprod.com


we will pay for your time





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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Dominik Stadler
2018-10-03 05:46:22 UTC
Permalink
Hi,

Please note this is about POI 4.0.0 on Android, not general use in Oracle
Java/OpenJDK, this is a completely different non-Java environment with lots
of differences in support for XML parsing, see
https://github.com/centic9/poi-on-android/issues/44 for some discussion of
getting POI 4.0.0 supported for Android, but unfortunately there are still
blocking issues.

Dominik.
Post by ranzhang35
Its too hard to share files here, please email me at rzhang at
mkprod.com
we will pay for your time
--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
Loading...