2009-12-07 41 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