java.util.zip.ZipException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • my dev plugin version 1.614 The error below occurs intermittently, with low frequency. but I have this zip file and can upzip it properly, I am not sure why this error pops up. pls reply ,thx ! java.util.zip.ZipException: archive is not a ZIP archive at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:481) at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:320) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:163) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:124) at hudson.FilePath.unzip(FilePath.java:571) at hudson.FilePath.access$300(FilePath.java:191) at hudson.FilePath$3.invoke(FilePath.java:496) at hudson.FilePath$3.invoke(FilePath.java:492) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.unzip(FilePath.java:492) at com.wangyin.ci.performance.PerformanceReporterPublisher.copyReportsToMaster(PerformanceReporterPublisher.java:742) at com.wangyin.ci.performance.PerformanceReporterPublisher.perform(PerformanceReporterPublisher.java:334) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) My code:(PerformanceReporterPublisher.copyReportsToMaster) private void copyReportsToMaster(AbstractBuild<?, ?> build, PrintStream logger, FilePath[] listfilFilePaths, String parserDisplayName) throws IOException, InterruptedException { FilePath remoteZipDir = null; FilePath remoteZip = null; try { String zipString = "report-result.zip"; String zipDirString = "report-result"; remoteZipDir = new FilePath(build.getModuleRoot(), zipDirString); remoteZipDir.mkdirs(); logger.println("copy remote report to remote report-result dir...."); for (FilePath src : listfilFilePaths) { src.copyTo(new FilePath(remoteZipDir, src.getName())); } remoteZip = new FilePath(remoteZipDir.getParent(), zipString); logger.println("compress remote report-result dir ...."); remoteZipDir.zip(remoteZip); File localReport = getPerformanceReport(build, parserDisplayName, zipString); FilePath localReportFilePath = new FilePath(localReport); logger.println("copy report-result zip to locate...."); remoteZip.copyTo(localReportFilePath); FilePath resultDir = new FilePath(localReportFilePath.getParent(), zipDirString); localReportFilePath.unzip(resultDir);
    via by Hu bingyin,
  • my dev plugin version 1.614 The error below occurs intermittently, with low frequency. but I have this zip file and can upzip it properly, I am not sure why this error pops up. pls reply ,thx ! java.util.zip.ZipException: archive is not a ZIP archive at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:481) at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:320) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:163) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:124) at hudson.FilePath.unzip(FilePath.java:571) at hudson.FilePath.access$300(FilePath.java:191) at hudson.FilePath$3.invoke(FilePath.java:496) at hudson.FilePath$3.invoke(FilePath.java:492) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.unzip(FilePath.java:492) at com.wangyin.ci.performance.PerformanceReporterPublisher.copyReportsToMaster(PerformanceReporterPublisher.java:742) at com.wangyin.ci.performance.PerformanceReporterPublisher.perform(PerformanceReporterPublisher.java:334) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) My code:(PerformanceReporterPublisher.copyReportsToMaster) private void copyReportsToMaster(AbstractBuild<?, ?> build, PrintStream logger, FilePath[] listfilFilePaths, String parserDisplayName) throws IOException, InterruptedException { FilePath remoteZipDir = null; FilePath remoteZip = null; try { String zipString = "report-result.zip"; String zipDirString = "report-result"; remoteZipDir = new FilePath(build.getModuleRoot(), zipDirString); remoteZipDir.mkdirs(); logger.println("copy remote report to remote report-result dir...."); for (FilePath src : listfilFilePaths) { src.copyTo(new FilePath(remoteZipDir, src.getName())); } remoteZip = new FilePath(remoteZipDir.getParent(), zipString); logger.println("compress remote report-result dir ...."); remoteZipDir.zip(remoteZip); File localReport = getPerformanceReport(build, parserDisplayName, zipString); FilePath localReportFilePath = new FilePath(localReport); logger.println("copy report-result zip to locate...."); remoteZip.copyTo(localReportFilePath); FilePath resultDir = new FilePath(localReportFilePath.getParent(), zipDirString); localReportFilePath.unzip(resultDir);
    via by Hu bingyin,
  • GitHub comment 1#272144629
    via GitHub by hemanthkp
    ,
  • GitHub comment 1#272145994
    via GitHub by hemanthkp
    ,
  • GitHub comment 1#272148616
    via GitHub by hemanthkp
    ,
  • GitHub comment 1#272217997
    via GitHub by hemanthkp
    ,
  • GitHub comment 1#272217987
    via GitHub by hemanthkp
    ,
  • FirstProject #10 failed
    via GitHub by hemanthkp
    ,
  • GitHub comment 1#271662090
    via GitHub by hemanthkp
    ,
    • java.util.zip.ZipException: archive is not a ZIP archive at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:481) at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:320) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:163) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:124) at hudson.FilePath.unzip(FilePath.java:571) at hudson.FilePath.access$300(FilePath.java:191) at hudson.FilePath$3.invoke(FilePath.java:496) at hudson.FilePath$3.invoke(FilePath.java:492) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.unzip(FilePath.java:492) at com.wangyin.ci.performance.PerformanceReporterPublisher.copyReportsToMaster(PerformanceReporterPublisher.java:742) at com.wangyin.ci.performance.PerformanceReporterPublisher.perform(PerformanceReporterPublisher.java:334) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)
    No Bugmate found.