question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError: org.apache.poi.javax.xml.stream.FactoryFinder

See original GitHub issue

Hi,

I’m facing the above issue even after adding the System properties as shown in ReadMe file.

Below is the log:

java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.NoClassDefFoundError: org.apache.poi.javax.xml.stream.FactoryFinder at org.apache.poi.javax.xml.stream.b.a(FactoryFinder.java:1) at org.apache.poi.javax.xml.stream.b.a(FactoryFinder.java:7) at org.apache.poi.javax.xml.stream.b.a(FactoryFinder.java:13) at org.apache.poi.javax.xml.stream.d.a(XMLEventFactory.java:1) at org.apache.poi.i.a.n.j.b.<clinit>(PackagePropertiesMarshaller.java:1) at org.apache.poi.i.a.a.v(OPCPackage.java:5) at org.apache.poi.i.a.a.<init>(OPCPackage.java:3) at org.apache.poi.i.a.l.<init>(ZipPackage.java:5) at org.apache.poi.i.a.a.a(OPCPackage.java:1) at org.apache.poi.util.l.a(PackageHelper.java:1) at org.apache.poi.l.b.l.<init>(XWPFDocument.java:1)

Target SDK Version is 29.

Its working in Debug APK. But not working in Release APK

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
kundanSingh11commented, Jun 15, 2020

ok got it working please add this lines to proguard rules

-keep public class com.fasterxml**{;} -keep class org.apache**{;} -keep class org.codehaus**{;} -keep class org.etsi**{;} -keep class org.openxmlformats**{;} -keep class schemaorg_apache_xmlbeans**{;}

0reactions
bitamirshafieecommented, Jun 5, 2021

That’s because you have pro guard turned on in release build type, you should keep the crashed class in your progaurd. for example for this you can use: -keep class org.apache.poi.javax.xml.stream.FactoryFinder{*;}

I had the same problem and after keeping, another crash pops up which needs another keep in progaurd, so what I did is just keep all the library’s classes. you can do the same too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoClassDefFoundError: javax/xml/stream/XMLStreamException
I am getting the following exception while trying to write an .xlsx file using Apache POI NoClassDefFoundError ...
Read more >
Integrating with third/3rd party libraries/JARs may result ...
at com.tibco.bw.palette.java.runtime. ... Caused by: javax.xml.stream. ... at org.apache.poi.openxml4j.opc.internal.marshallers.
Read more >
[Solved] How to fix java.lang.NoClassDefFoundError - YouTube
How to solve the error: java.lang. NoClassDefFoundError : javax / xml /bind/JAXBExceptionThe highly possible cause of this error is:- JAXB ( Java ......
Read more >
java.lang.NoClassDefFoundError: org/apache/xmlbeans ...
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject error means that your Java program needed a class called ...
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
Watch out for this carefully as here root cause is absent of User.class file. java.lang.NoClassDefFoundError: testing/User at testing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found