我正在使用intelliJ-IDE-14创建一个名为**app
的SpringMVC项目,该项目最初被部署到JBoss Wildfly 9.0.1。最终的名称为app.war
**
下面是我的问题的一步一步的场景;
- 完成项目配置以利用Maven后|Spring|Hibernate| WildFly| Velocity,然后我制作了一个项目的副本,将新副本重构为**
demo
,并继续在demo
上工作。这样,我就可以始终重用app
**作为准系统启动模板。 - 做完这些之后,我继续在**
demo
**上工作。 - 我已将maven配置为将**
demo
的输出war文件命名为ROOT.war
** - 另外,为了让我不要忘记,我也回到了**
app
,并将maven配置为将app
的输出war文件命名为ROOT.war
** - 现在我运行**
demo
**,它被部署,点击控制器并显示登录页面。一切正常,除了当我检查日志时,我看到以下异常被抛出,而它正在部署。 - 请参阅堆栈跟踪;*
INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "app.war" (runtime-name: "app.war")
INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-8) WFLYDS0013: Started FileSystemDeploymentService for directory C:\jBoss\wildfly-9.0.1.Final\standalone\deployments
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."app.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."app.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "app.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160:
Failed to mount deployment content
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:95)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
Caused by: java.io.FileNotFoundException: C:\project-path\demo\target\app.war (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.jboss.vfs.spi.RootFileSystem.openInputStream(RootFileSystem.java:51)
at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:254)
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533)
at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:108)
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:91)
... 6 more
[INFO]...//(omitted for brevity)
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "app.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"app.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"app.war\".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"app.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content
Caused by: java.io.FileNotFoundException: C:\\project-path\\demo\\target\\app.war (The system cannot find the file specified)"}}
21:08:21,658 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "app.war" (runtime-name : "app.war")
21:08:21,667 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."app.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."app.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "app.war"
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
20:32:13,137 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
20:32:13,137 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started (with errors) in 7442ms - Started 205 of 383 services (1 services failed or missing dependencies, 211 services are lazy, passive or on-demand)
Connected to server
[2015-10-24 08:32:15,100] Artifact demo:war: Artifact is being deployed, please wait...
[INFO]... //(omitted for brevity)
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."app.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."app.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "app.war"
[2015-10-24 08:32:30,629] Artifact demo:war: Artifact is deployed successfully
字符串
因此,本质上,这意味着演示可以很好地部署,但在此过程中,它找不到一个文件。
- 请注意这一行;*
Caused by: java.io.FileNotFoundException: C:\project-path\demo\target\app.war (The system cannot find the file specified)
型
这很奇怪,因为这个文件**app.war
甚至不应该再存在于demo
的上下文中,因为我已经完成了一个完整的重构。在检查了整个demo
目录之后,没有找到任何对app.war
的引用,我想这可能只是一个intelliJ引用问题。因此我取消了对demo
*的部署,清理了该项目,关闭了intelliJ,删除了 .idea * 文件夹,并从现有的源代码中创建了一个新的maven项目,希望这样可以清除demo
中可能存在的app
的任何残余,我再次运行了demo
**,但又遇到了相同的异常。
- 另外,请注意粘贴的StackTrace中的第一行;*
INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "app.war" (runtime-name: "app.war")
型
这表明Wildfly首先尝试部署**app.war
,而应该部署的是demo.war
,因为我正在运行的是demo
**项目。
在所有的事情之后,这让我怀疑问题一定是在Wildfly的范围内,我可能需要删除Wildfly中某个地方的旧引用,但我对潜在问题的想法迷失了方向。
谢谢.
2条答案
按热度按时间yacmzcpb1#
已经解决了。原来这不是什么智力问题。
出于某种原因,我发现在 standalone.xml 中,通常在运行时自动添加的以下行 (并且在应用程序停止时总是自动删除) 只是拒绝去...
字符串
所以我只是进去删除了那些行,所以瞧!错误消失了!
dzjeubhm2#
登录到jboss管理控制台并删除旧的应用程序,然后在intellij中重新启动jboss。