java.util.zip.ZipException:zip文件为空

时间:2014-10-23 12:11:01

标签: jboss7.x

Caused by: java.util.zip.ZipException: zip file is empty
    at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_51]
    at java.util.zip.ZipFile.<init>(ZipFile.java:215) [rt.jar:1.7.0_51]
    at java.util.zip.ZipFile.<init>(ZipFile.java:145) [rt.jar:1.7.0_51]
    at java.util.jar.JarFile.<init>(JarFile.java:153) [rt.jar:1.7.0_51]
    at java.util.jar.JarFile.<init>(JarFile.java:117) [rt.jar:1.7.0_51]
    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.createResourceRoot(EarStructureProcessor.java:242)
    at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:159)
    ... 6 more

我正在使用JPA 2.0,Ejb 3.0和前端jsf 1.2,richfaces 3.3.3,jboss 7.1。请提供一些解决方案。提前致谢

1 个答案:

答案 0 :(得分:0)

在部署Netbeans生成的EAR时遇到了同样的问题,右键单击&#34; Clean&#34;然后在&#34; Deploy&#34;。

就我而言,当右键点击&#34;清理和构建&#34; Netbeans为子项目重复生成一个空的JAR。由于这个空的JAR,我在部署期间获得的堆栈跟踪数量与您相同。

按照Riadh的建议,打开您的EAR文件,查找无效和/或空JAR。