2009-12-07 44 views
0

所有,Jboss的战争抛出:ZipException调动

Server: jboss-5.1.0
Java Version: jdk1.6.0_14
Deployment Method: ant v1.7
Error: 08:40:04,260 WARN [ZipEntryContext] IGNORING: Failed to reinitialize context: vfszip:/home/username/jboss-5.1.0.GA/server/default/deploy/deployment.war
java.util.zip.ZipException: error in opening zip file

错误,我运行一个蚂蚁在我的SRC代码部署。这一切都是通过我们的服务器上的VI完成的。

我已经搜索了我们的JBOSS设置,但似乎找不到正确的摆脱这个错误。想法?

更新:
这是我们的部署方法。

<target name="deploy" depends="war" description="--> The deploy target (initially empty)"> 
    <copy file="scripts/xmlscript.groovy" todir="${jboss.bin.dir}" overwrite="true"/> 
    <copy file="grails-app/views/xmlService/current.xml" todir="${jboss.bin.dir}" overwrite="true"/> 
    <copy file="${war.file}" todir="${jboss.deploy.dir}" overwrite="true"/> 
</target> 

谢谢。

+0

“ant deploy”究竟执行什么操作?它是在JBoss'deploy'目录下构建战争还是复制WAR? – 2009-12-07 15:45:19

+0

编辑帖子以添加我们的部署方法。 – XanderLynn 2009-12-07 16:24:29

回答

2

不知道,但据JBAS-6612

This is an issue due to the fact that the copy is not atomic. To work around this issue temporarily, use the move command instead as it is atomic.

你能尝试使用Ant任务move,而不是复制?

+0

非常感谢。这似乎解决了我们的问题。 – XanderLynn 2009-12-09 15:12:06

+0

不客气。很高兴它有帮助。 – 2009-12-09 15:19:22

+0

链接为蚂蚁移动任务破碎。 – 2010-11-10 14:42:46

1

很难说,但我的猜测是JBoss在Ant被完全复制之前试图打开并部署WAR文件。复制到正在运行的JBoss服务器的deploy目录时,这总是风险很大。

只有在JBoss关闭的情况下才这样做更安全,但显然这不是一个理想的情况。或者,您可以禁用部署扫描程序(它可以自动检测deploy下的可部署内容),也可以通过JMX手动控制部署(这有点费力),或者可以降低部署扫描程序运行的频率(默认为每5秒,在deploy/hdscanner-jboss-beans.xml中定义)。

+0

伟大的建议,但Skaffman似乎并没有解决我们的问题。 – XanderLynn 2009-12-07 16:22:23