centic9 / poi-on-android

A sample project that shows how Apache POI can be used in an Android application
Apache License 2.0
357 stars 89 forks source link

Crash due to not able to locate index.xsb #104

Closed baum-sparton closed 1 year ago

baum-sparton commented 1 year ago

Just pulled down the latest source code, built, and deployed the release build of poitest. It immediately crashes with the below stack trace. Same issue occurred on both Android 10 and 13. Any ideas? Thanks.

2023-05-15 11:25:49.845 18093-18093 AndroidRuntime pid-18093 E FATAL EXCEPTION: main Process: org.dstadler.poiandroidtest.poitest, PID: 18093 java.lang.ExceptionInInitializerError at org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.(Unknown Source:2) at g3.o0.(SourceFile:16) at org.dstadler.poiandroidtest.poitest.MainActivity.a(Unknown Source:4) at org.dstadler.poiandroidtest.poitest.MainActivity.onCreate(Unknown Source:29) at android.app.Activity.performCreate(Activity.java:8591) at android.app.Activity.performCreate(Activity.java:8570) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Caused by: l3.j0: XML-BEANS compiled schema: Could not locate compiled schema resource j2/index.xsb (j2.index) - code 0 at org.apache.xmlbeans.impl.schema.g.(SourceFile:49) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.S(Unknown Source:18) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.(SourceFile:29) at j2.a.(Unknown Source:2) at j2.a.(Unknown Source:2) at org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.(Unknown Source:2)  at g3.o0.(SourceFile:16)  at org.dstadler.poiandroidtest.poitest.MainActivity.a(Unknown Source:4)  at org.dstadler.poiandroidtest.poitest.MainActivity.onCreate(Unknown Source:29)  at android.app.Activity.performCreate(Activity.java:8591)  at android.app.Activity.performCreate(Activity.java:8570)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loopOnce(Looper.java:226)  at android.os.Looper.loop(Looper.java:313)  at android.app.ActivityThread.main(ActivityThread.java:8757)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) 

baum-sparton commented 1 year ago

In case it helps this was done using Android Studio 2022.2.1.

centic9 commented 1 year ago

Please try with the latest version, the changes in https://github.com/centic9/poi-on-android/commit/909587068abc2c1e8e19b2cfc3b765b605ebba85 for #105 could also fix this one.

baum-sparton commented 1 year ago

Sorry for the delay. Yes, the issue is resolved by the fix.