JBoss 5.1 显示“无法处理更改”热部署 WAR 时
我对此很陌生,所以很有可能我做错了什么,但我只是想开始使用 JBoss 5.1 编写一些 JSP。我编写 JSP 页面(非常基本,只是一些 HTML 和一点输出,以确保 JSP 确实正在被处理),然后我尝试构建 WAR 并使用以下命令热部署它
jar -cvf jsptests.war *.jsp WEB-INF
copy jsptests.war "%JBOSS_HOME%\server\default\deploy"
: JBoss 正在运行,然后它将复制到部署文件夹中,并且在我启动 JBoss 后它将出现,但是,如果我在 JBoss 运行时执行相同的操作,我会在控制台中看到以下错误:
WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] (HDScanner) Failed to process changes
java.lang.RuntimeException: Error while adding re-deployments
我见过其他一些人遇到此问题在其他一些论坛上但没有找到任何地方都有答案。谢谢。
I'm very new to this, so there's a good chance I'm doing something wrong, but I'm just trying to get set up with writing some JSPs using JBoss 5.1. I write the JSP page (really basic, just some HTML and a little bit of output to make sure the JSP is actually being processed) then I try to build the WAR and hot deploy it with the following commands:
jar -cvf jsptests.war *.jsp WEB-INF
copy jsptests.war "%JBOSS_HOME%\server\default\deploy"
If I do this without having JBoss running, then it will copy into the deploy folder and it will appear after I start JBoss, however, if I do the same thing while JBoss is running I see the following error in the console:
WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] (HDScanner) Failed to process changes
java.lang.RuntimeException: Error while adding re-deployments
I've seen a few others experiencing this on some other forums but haven't found an answer anywhere. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当文件未完全复制,但 JBoss 的热部署扫描程序看到那里有一个 .war 文件并尝试读取它时,就会发生这种情况。解决此问题的一种方法是移动/重命名该文件,而不是复制它,因为该操作是原子操作大多数操作系统(即JBoss在操作完成之前无法“看到”它,因此它不会读取不完整的文件)
This happends when the file is not fully copied, but JBoss's hot deploy scanner sees a .war file there and tries to read it.One way to do solve this is to move/rename the file rather than copy it as that operation is atomic on most operating systems (i.e. JBoss will not be able to "see" it until the operation is finished and thus it will not read an uncomplete file)