Illegal exception zip file is closed in apache poi for docx file creating after build as jar

672 views Asked by At

Am creating docx file using poi and its supporting jars. It is working fine in my IDE but when I build as jar it is not working. It throws the below error

  Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException:     
      Zip File is closed at          org.apache.poi.openxml4j.util.ZipFileZipEntrySource.getEntries(ZipFil    eZipEntrySource.java:45) at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java: 182) 
    at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:665)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:226)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:186)
    at org.apache.poi.POIXMLDocument.openPackage(POIXMLDocument.java:67)    
0

There are 0 answers