Unable to open zip file errors leading to 1.not.found.as.resource error using iTextG












0















My app will occasionally crash with the error message shown below. It's unable to find some .apk files (some of which I had to omit to fit the text limit) then iText throws a 1.not.found.as.resource error, which I think occurs because it can't find these files. I've tried to invalidate the cache and restart, but the crash will still occur every now and then. I just don't know how they got deleted or how to fix them. I'm also not sure how it could work most of the time and then crash like this only every now and then. How could it find the files in one instance but not another?



11-22 19:30:27.883  8114  8114 E System  : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
11-22 19:30:27.885 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
11-22 19:30:27.885 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
11-22 19:30:27.885 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
11-22 19:30:27.885 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
11-22 19:30:27.885 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
11-22 19:30:27.885 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
11-22 19:30:27.885 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
11-22 19:30:27.885 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
11-22 19:30:27.895 8114 8114 E System : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
11-22 19:30:27.895 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
11-22 19:30:27.895 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
11-22 19:30:27.895 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
11-22 19:30:27.895 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
11-22 19:30:27.895 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
11-22 19:30:27.895 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
11-22 19:30:27.895 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
11-22 19:30:27.895 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
11-22 19:30:27.915 8114 8114 W System.err: No message found for 1.not.found.as.resource
11-22 19:30:27.919 8114 8114 W System.err: No message found for 1.not.found.as.resource
11-22 19:30:27.920 8114 8114 D AndroidRuntime: Shutting down VM
11-22 19:30:27.921 8114 8114 E AndroidRuntime: FATAL EXCEPTION: main
11-22 19:30:27.921 8114 8114 E AndroidRuntime: Process: testapp.dipsheetcreator, PID: 8114
11-22 19:30:27.921 8114 8114 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{testapp.dipsheetcreator/testapp.dipsheetgenerator.ViewPDF}: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2955)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:191)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:568)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:222)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7183)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)









share|improve this question



























    0















    My app will occasionally crash with the error message shown below. It's unable to find some .apk files (some of which I had to omit to fit the text limit) then iText throws a 1.not.found.as.resource error, which I think occurs because it can't find these files. I've tried to invalidate the cache and restart, but the crash will still occur every now and then. I just don't know how they got deleted or how to fix them. I'm also not sure how it could work most of the time and then crash like this only every now and then. How could it find the files in one instance but not another?



    11-22 19:30:27.883  8114  8114 E System  : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
    11-22 19:30:27.885 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
    11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
    11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
    11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
    11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
    11-22 19:30:27.885 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
    11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
    11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
    11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
    11-22 19:30:27.885 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
    11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
    11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
    11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
    11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
    11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
    11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
    11-22 19:30:27.885 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
    11-22 19:30:27.885 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
    11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
    11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
    11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
    11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
    11-22 19:30:27.885 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
    11-22 19:30:27.885 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
    11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
    11-22 19:30:27.885 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
    11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
    11-22 19:30:27.895 8114 8114 E System : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
    11-22 19:30:27.895 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
    11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
    11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
    11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
    11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
    11-22 19:30:27.895 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
    11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
    11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
    11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
    11-22 19:30:27.895 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
    11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
    11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
    11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
    11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
    11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
    11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
    11-22 19:30:27.895 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
    11-22 19:30:27.895 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
    11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
    11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
    11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
    11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
    11-22 19:30:27.895 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
    11-22 19:30:27.895 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
    11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
    11-22 19:30:27.895 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
    11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
    11-22 19:30:27.915 8114 8114 W System.err: No message found for 1.not.found.as.resource
    11-22 19:30:27.919 8114 8114 W System.err: No message found for 1.not.found.as.resource
    11-22 19:30:27.920 8114 8114 D AndroidRuntime: Shutting down VM
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: FATAL EXCEPTION: main
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: Process: testapp.dipsheetcreator, PID: 8114
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{testapp.dipsheetcreator/testapp.dipsheetgenerator.ViewPDF}: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2955)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:191)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:568)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:222)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7183)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)









    share|improve this question

























      0












      0








      0








      My app will occasionally crash with the error message shown below. It's unable to find some .apk files (some of which I had to omit to fit the text limit) then iText throws a 1.not.found.as.resource error, which I think occurs because it can't find these files. I've tried to invalidate the cache and restart, but the crash will still occur every now and then. I just don't know how they got deleted or how to fix them. I'm also not sure how it could work most of the time and then crash like this only every now and then. How could it find the files in one instance but not another?



      11-22 19:30:27.883  8114  8114 E System  : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
      11-22 19:30:27.885 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
      11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
      11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
      11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
      11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
      11-22 19:30:27.885 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.885 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.885 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.885 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.885 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.895 8114 8114 E System : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
      11-22 19:30:27.895 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
      11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
      11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
      11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
      11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
      11-22 19:30:27.895 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.895 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.895 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.895 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.895 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.915 8114 8114 W System.err: No message found for 1.not.found.as.resource
      11-22 19:30:27.919 8114 8114 W System.err: No message found for 1.not.found.as.resource
      11-22 19:30:27.920 8114 8114 D AndroidRuntime: Shutting down VM
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: FATAL EXCEPTION: main
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Process: testapp.dipsheetcreator, PID: 8114
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{testapp.dipsheetcreator/testapp.dipsheetgenerator.ViewPDF}: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2955)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:191)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:568)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:222)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)









      share|improve this question














      My app will occasionally crash with the error message shown below. It's unable to find some .apk files (some of which I had to omit to fit the text limit) then iText throws a 1.not.found.as.resource error, which I think occurs because it can't find these files. I've tried to invalidate the cache and restart, but the crash will still occur every now and then. I just don't know how they got deleted or how to fix them. I'm also not sure how it could work most of the time and then crash like this only every now and then. How could it find the files in one instance but not another?



      11-22 19:30:27.883  8114  8114 E System  : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
      11-22 19:30:27.885 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/base.apk
      11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
      11-22 19:30:27.885 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
      11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
      11-22 19:30:27.885 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
      11-22 19:30:27.885 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
      11-22 19:30:27.885 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.885 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.885 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.885 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.885 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.885 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.885 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.885 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.885 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.885 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.895 8114 8114 E System : Unable to open zip file: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
      11-22 19:30:27.895 8114 8114 E System : java.io.FileNotFoundException: File doesn't exist: /data/app/testapp.dipsheetcreator-Z1HJ7fu5_gAR7OuwuDIw8g==/split_lib_slice_9_apk.apk
      11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:212)
      11-22 19:30:27.895 8114 8114 E System : at java.util.zip.ZipFile.<init>(ZipFile.java:149)
      11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:160)
      11-22 19:30:27.895 8114 8114 E System : at java.util.jar.JarFile.<init>(JarFile.java:97)
      11-22 19:30:27.895 8114 8114 E System : at libcore.io.ClassPathURLStreamHandler.<init>(ClassPathURLStreamHandler.java:47)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:655)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList$Element.findResource(DexPathList.java:682)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.DexPathList.findResource(DexPathList.java:488)
      11-22 19:30:27.895 8114 8114 E System : at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:112)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResource(ClassLoader.java:793)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:987)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.io.StreamUtil.getResourceStream(StreamUtil.java:117)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:187)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:214)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.895 8114 8114 E System : at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.895 8114 8114 E System : at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.895 8114 8114 E System : at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.895 8114 8114 E System : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.895 8114 8114 E System : at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.895 8114 8114 E System : at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.895 8114 8114 E System : at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.895 8114 8114 E System : at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.895 8114 8114 E System : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.915 8114 8114 W System.err: No message found for 1.not.found.as.resource
      11-22 19:30:27.919 8114 8114 W System.err: No message found for 1.not.found.as.resource
      11-22 19:30:27.920 8114 8114 D AndroidRuntime: Shutting down VM
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: FATAL EXCEPTION: main
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Process: testapp.dipsheetcreator, PID: 8114
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{testapp.dipsheetcreator/testapp.dipsheetgenerator.ViewPDF}: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2955)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: ExceptionConverter: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: Caused by: com.itextpdf.text.DocumentException: No message found for 1.not.found.as.resource
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.Type1Font.<init>(Type1Font.java:191)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:700)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:625)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:568)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getBaseFont(FontFactoryImp.java:222)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:189)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactoryImp.getFont(FontFactoryImp.java:143)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:131)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.itextpdf.text.FontFactory.getFont(FontFactory.java:259)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.addMainTable(ViewPDF.java:941)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.createPDF(ViewPDF.java:2984)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at testapp.dipsheetgenerator.ViewPDF.onCreate(ViewPDF.java:235)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7183)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      11-22 19:30:27.921 8114 8114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)






      android itextg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 24 '18 at 2:21









      adoyon23adoyon23

      229




      229
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53454657%2funable-to-open-zip-file-errors-leading-to-1-not-found-as-resource-error-using-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53454657%2funable-to-open-zip-file-errors-leading-to-1-not-found-as-resource-error-using-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Costa Masnaga

          Fotorealismo

          Sidney Franklin