Author Topic: Expected central directory entry not found (#1) on Debian  (Read 2742 times)

broesel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Expected central directory entry not found (#1) on Debian
« on: May 05, 2017, 01:51:47 PM »
Hello,

I was using the zip4j (v1.3.2) fine on windows 10 (running in an tomcat 8.5.5)
and the ZipFile::extractFile worked fine.

Now after finishing everything, I deployed my webapp to an debian (6.0.10) running tomcat 8.0.9 but now I get
Code: [Select]
net.lingala.zip4j.exception.ZipException: Expected central directory entry not found (#1)
        at net.lingala.zip4j.core.HeaderReader.readCentralDirectory(HeaderReader.java:224) ~[HeaderReader.class:?]
        at net.lingala.zip4j.core.HeaderReader.readAllHeaders(HeaderReader.java:94) ~[HeaderReader.class:?]
        at net.lingala.zip4j.core.ZipFile.readZipInfo(ZipFile.java:425) ~[ZipFile.class:?]
        at net.lingala.zip4j.core.ZipFile.extractFile(ZipFile.java:622) ~[ZipFile.class:?]
        at net.lingala.zip4j.core.ZipFile.extractFile(ZipFile.java:587) ~[ZipFile.class:?]
        at net.lingala.zip4j.core.ZipFile.extractFile(ZipFile.java:566) ~[ZipFile.class:?]

using the same files I did so many tests ago (they are downloaded from a public FTP server)


Do you know if there are any pitfalls? I will test it on another server with different OS and tomcat version, but if someone knows what could be responsible for the exception I would be glad.

Thank you


broesel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Expected central directory entry not found (#1) on Debian
« Reply #1 on: May 08, 2017, 10:10:25 AM »
After testing it on an external server (no firewall which could interfere), the problem somehow has to be with the apache commons FTPClient.

ZipInputStream does work though with some files, so at least I can work around this

 


Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 346

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 347

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 348

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 351

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 352

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 353
Connection Problems

Connection Problems

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.