Passionate Engineer
Passionate Engineer

Reputation: 10412

ZipException: Zip file is empty - Wildfly

I'm getting below error:

06:09:52,112 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."auth-server.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."auth-server.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "auth-server.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017324: Failed to process WEB-INF/lib: "/home/qwer/IdeaProjects/wildfly-8.2.0.Final/standalone/deployments/auth-server.war/WEB-INF/lib/xmlsec-1.5.1.jar"
    at org.wildfly.extension.undertow.deployment.WarStructureDeploymentProcessor.deploy(WarStructureDeploymentProcessor.java:125)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    ... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017324: Failed to process WEB-INF/lib: "/home/qwer/IdeaProjects/wildfly-8.2.0.Final/standalone/deployments/auth-server.war/WEB-INF/lib/xmlsec-1.5.1.jar"
    at org.wildfly.extension.undertow.deployment.WarStructureDeploymentProcessor.createResourceRoots(WarStructureDeploymentProcessor.java:180)
    at org.wildfly.extension.undertow.deployment.WarStructureDeploymentProcessor.deploy(WarStructureDeploymentProcessor.java:120)
    ... 6 more
Caused by: java.util.zip.ZipException: zip file is empty
    at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_65]
    at java.util.zip.ZipFile.<init>(ZipFile.java:215) [rt.jar:1.7.0_65]
    at java.util.zip.ZipFile.<init>(ZipFile.java:145) [rt.jar:1.7.0_65]
    at java.util.jar.JarFile.<init>(JarFile.java:154) [rt.jar:1.7.0_65]
    at java.util.jar.JarFile.<init>(JarFile.java:118) [rt.jar:1.7.0_65]
    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:94) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
    at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:81) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
    at org.jboss.vfs.VFS.mountZip(VFS.java:386) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
    at org.jboss.vfs.VFS.mountZip(VFS.java:410) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
    at org.wildfly.extension.undertow.deployment.WarStructureDeploymentProcessor.createResourceRoots(WarStructureDeploymentProcessor.java:172)

The main thing I can see is Zip file is empty error. How do I mitigate this so it's not throwing this error?

Upvotes: 1

Views: 6807

Answers (2)

Jai Krishnan
Jai Krishnan

Reputation: 21

You might have deleted the .jar file in your project. Download the jar and copy in lib folder and rebuild the project. I had this issue in android studio.Make sure that your .jar is a valid one (check its size)

Upvotes: 1

Tomaz Cerar
Tomaz Cerar

Reputation: 5791

Something is wrong with your auth-server.war/WEB-INF/lib/xmlsec-1.5.1.jar it cannot be opened as jar / zip most probably is corrupt.

Make sure it is properly copied and that jar is valid zip.

Upvotes: 1

Related Questions