Java.util.zip.ZipException: invalid END header (bad central directory offset) in EAP 6

Solution Verified - Updated -

Issue

  • When starting the server with a deployment in the deployments directory, a zip-related exception with a Caused by section like java.util.zip.ZipException: invalid END header (bad central directory offset) is thrown.
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."WIZ1_EIZ0001S.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."WIZ1_EIZ0001S.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "WIZ1_EIZ0001S.ear"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-tmc1.jar:7.1.2.Final-tmc1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011060: Failed to process children for EAR ["/appl/online/cell1/ear/IZ/BBWIZ1/WIZ1_EIZ0001S.ear"]
    at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:218)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-tmc1.jar:7.1.2.Final-tmc1]
    ... 5 more
Caused by: java.util.zip.ZipException: invalid END header (bad central directory offset)
    at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.6.0_45]
    at java.util.zip.ZipFile.<init>(ZipFile.java:127) [rt.jar:1.6.0_45]
    at java.util.jar.JarFile.<init>(JarFile.java:136) [rt.jar:1.6.0_45]
    at java.util.jar.JarFile.<init>(JarFile.java:100) [rt.jar:1.6.0_45]
    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:97)
    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:83)
    at org.jboss.vfs.VFS.mountZip(VFS.java:408)
    at org.jboss.vfs.VFS.mountZip(VFS.java:434)
    at org.jboss.as.ee.structure.EarStructureProcessor.mount(EarStructureProcessor.java:223)
    at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:118)
    ... 6 more
  • When deploying my application on EAP, getting JBAS018733 error like below:
[Server:server-two] 18:56:23,099 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."MyWebApp.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyWebApp.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "MyWebApp.war"
......
[Server:server-two] Caused by: java.util.zip.ZipException: invalid END header (bad central directory offset)
[Server:server-two]         at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_45]
[Server:server-two]         at java.util.zip.ZipFile.<init>(ZipFile.java:215) [rt.jar:1.7.0_45]
[Server:server-two]         at java.util.zip.ZipFile.<init>(ZipFile.java:145) [rt.jar:1.7.0_45]
[Server:server-two]         at java.util.zip.ZipFile.<init>(ZipFile.java:159) [rt.jar:1.7.0_45]
[Server:server-two]         at org.jboss.vfs.VFSUtils.unzip(VFSUtils.java:823) [jboss-vfs-3.2.2.Final-redhat-1.jar:3.2.2.Final-redhat-1]
[Server:server-two]         at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:504) [jboss-vfs-3.2.2.Final-redhat-1.jar:3.2.2.Final-redhat-1]
[Server:server-two]         at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533) [jboss-vfs-3.2.2.Final-redhat-1.jar:3.2.2.Final-redhat-1]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content