java.util.zip.ZipException: invalid code lengths set" error when I try to get a bin file from the assets. I can not figure out how to fix it or what it means. Please help. My code: SentenceModel model = null; InputStream modelIn = null; try { modelIn = IOUtils.toInputStream(ReadFromfile("en-sent.bin", context)); model = new SentenceModel(modelIn); } catch (IOException e) { e.printStackTrace(); } finally { if (modelIn != null) { try { modelIn.close(); } catch (IOException e) { } } } Stack trace: 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: java.util.zip.ZipException: invalid code lengths set 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.zip.ZipInputStream.read(ZipInputStream.java:360) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.InputStreamReader.read(InputStreamReader.java:233) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.fillBuf(BufferedReader.java:145) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.readChar(BufferedReader.java:263) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.read(BufferedReader.java:253) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.Properties.load(Properties.java:289)

Stack Overflow | Tdonut | 4 months ago
  1. 0

    Android ZipException

    Stack Overflow | 4 months ago | Tdonut
    java.util.zip.ZipException: invalid code lengths set" error when I try to get a bin file from the assets. I can not figure out how to fix it or what it means. Please help. My code: SentenceModel model = null; InputStream modelIn = null; try { modelIn = IOUtils.toInputStream(ReadFromfile("en-sent.bin", context)); model = new SentenceModel(modelIn); } catch (IOException e) { e.printStackTrace(); } finally { if (modelIn != null) { try { modelIn.close(); } catch (IOException e) { } } } Stack trace: 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: java.util.zip.ZipException: invalid code lengths set 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.zip.ZipInputStream.read(ZipInputStream.java:360) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.InputStreamReader.read(InputStreamReader.java:233) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.fillBuf(BufferedReader.java:145) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.readChar(BufferedReader.java:263) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.read(BufferedReader.java:253) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.Properties.load(Properties.java:289)
  2. 0

    CIM_ERR_FAILED: CIM Error during import prepara... | SCN

    sap.com | 9 months ago
    com.sap.sld.api.wbem.exception.CIMException: CIM_ERR_FAILED: CIM Error during import preparation
  3. 0

    Creation of Simple Spring Hibernate Utility Project with Template: app-context file in error

    Stack Overflow | 5 years ago | Pascal
    java.lang.IllegalStateException: Failed to load ApplicationContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Publishing to Tomcat v7.0 Server at localhost has encountered problem (Tomcat forum at Coderanch)

    coderanch.com | 8 months ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/beans.xml]; nested exception is java.lang.IllegalStateException: Unable to load schema mappings from location [META-INF/spring.schemas]
  6. 0

    Failed to load resources in jar file when jar file is replaced

    Stack Overflow | 3 years ago | St. Louski
    java.util.zip.ZipException: invalid stored block lengths. The stack trace is as following: Caused by: java.util.zip.ZipException: invalid stored block lengths

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.util.zip.ZipException

      invalid code lengths set" error when I try to get a bin file from the assets. I can not figure out how to fix it or what it means. Please help. My code: SentenceModel model = null; InputStream modelIn = null; try { modelIn = IOUtils.toInputStream(ReadFromfile("en-sent.bin", context)); model = new SentenceModel(modelIn); } catch (IOException e) { e.printStackTrace(); } finally { if (modelIn != null) { try { modelIn.close(); } catch (IOException e) { } } } Stack trace: 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: java.util.zip.ZipException: invalid code lengths set 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.zip.ZipInputStream.read(ZipInputStream.java:360) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.InputStreamReader.read(InputStreamReader.java:233) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.fillBuf(BufferedReader.java:145) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.readChar(BufferedReader.java:263) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.io.BufferedReader.read(BufferedReader.java:253) 08-04 11:34:14.461 21060-21060/com.gigstudios.newssummary W/System.err: at java.util.Properties.load(Properties.java:289)

      at java.util.Properties.load()
    2. Java RT
      Properties.load
      1. java.util.Properties.load(Properties.java:248)
      1 frame
    3. opennlp.tools.util
      BaseModel.<init>
      1. opennlp.tools.util.model.PropertiesSerializer.create(PropertiesSerializer.java:34)
      2. opennlp.tools.util.model.PropertiesSerializer.create(PropertiesSerializer.java:29)
      3. opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:241)
      4. opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:179)
      4 frames
    4. opennlp.tools.sentdetect
      SentenceModel.<init>
      1. opennlp.tools.sentdetect.SentenceModel.<init>(SentenceModel.java:96)
      1 frame
    5. com.gigstudios.newssummary
      MainActivity$1.run
      1. com.gigstudios.newssummary.WordCounter.makeSentences(WordCounter.java:61)
      2. com.gigstudios.newssummary.Article.<init>(Article.java:19)
      3. com.gigstudios.newssummary.ArticleReceiver.receiveNewsArticles(ArticleReceiver.java:87)
      4. com.gigstudios.newssummary.ArticleReceiver.<init>(ArticleReceiver.java:37)
      5. com.gigstudios.newssummary.MainActivity.fetchNews(MainActivity.java:114)
      6. com.gigstudios.newssummary.MainActivity$1.run(MainActivity.java:52)
      6 frames
    6. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:746)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:148)
      4. android.app.ActivityThread.main(ActivityThread.java:5443)
      4 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
      2 frames