How to dereference old Wildfly 9.0.1 deployment artifacts of Spring MVC app built with intelliJ-IDE?

SourceVisor

I'm using intelliJ-IDE-14 to create a SpringMVC project named app which was initially being deployed to JBoss Wildfly 9.0.1.Final as app.war

Here's the step by step scenario leading up to my issue;

  • After finishing project config to utilize Maven | Spring | Hibernate | Wildfly | Velocity, then I made a copy of the project, refactored the new copy as demo and continued working on demo. That way, I could always re-use app as a barebones start-up template.

  • With that done, I then continued work on demo.

  • I configured maven to name output war file of demo to be ROOT.war

  • Also, just so I don't forget, I go back to app too and configured maven to name output war file of app as ROOT.war

  • Now I run demo, it gets deployed, hits the controller and displays landing page. All is fine, except when I check the logs I see the following exceptions being thrown while it is being deployed.

See StackTrace;

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

So essentially it means demo gets deployed fine, but in the process it can't find one file.

Notice this line;

Caused by: java.io.FileNotFoundException: C:\project-path\demo\target\app.war (The system cannot find the file specified)

Now this is quite strange as this file app.war shouldn't even exist in the context of demo anylonger because I had already done a complete refactoring. After inspecting the whole demo directory and not finding any reference to app.war then I thought it might just be an intelliJ referencing issue, so I undeployed demo cleaned the project, closed intelliJ, deleted the .idea folder and created a new maven project from the existing sources. Hoping this would clear any residues of app that may exist in demo, I ran demo again, but hit the same exception again.

Also, notice the first line in the pasted StackTrace;

INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "app.war" (runtime-name: "app.war")

This shows that Wildfly is first of all attempting to deploy app.war whereas it's demo.war that should be getting deployed because what i'm running is the demo project.

After everything, this leaves me suspecting the problem has to be in the scope of Wildfly, and that I might need to remove old references somewhere within Wildfly, but I am lost on ideas of what might be the underlying problem. Help would be much appreciated.

Thanks.

SourceVisor

Solved this already. Turned out this wasn't particularly an intellij issue.

For some reason, I found that in standalone.xml, the following lines that normally get automatically added at runtime (and always automatically removed when application is stopped) just refused to go...

<deployments>
    <deployment name="app.war" runtime-name="app.war">
            <fs-archive path="C:\project-path\demo\target\app.war"/>
    </deployment>
</deployments>

So I simply went in there and deleted those lines, so voila! error be gone!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

spring boot hotswap with Intellij IDE

From Dev

How to terminate Firebase thread in Spring MVC app

From Dev

How to create Spring MVC application with Maven structure in Intellij IDEA 13.1?

From Dev

How to set deployment order of two ears in Wildfly

From Dev

WildFly - How To View Deployment

From Dev

Redistribute Intellij IDE GUI app

From Dev

Spring WebApplicationInitializer not working in wildfly 8.2.0 EAR Deployment

From Dev

Deployment failed on Wildfly 9

From Dev

Running a Spring MVC program in Intellij

From Dev

Spring MVC App runs in Eclipse but not Intellij - 404 Not Found

From Dev

How to configure Wildfly 9 to failover HTTP sessions

From Dev

JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

From Dev

Wildfly 9 - How do I exclude Jackson

From Dev

IntelliJ + Spring Web MVC

From Dev

IntelliJ + Spring Web MVC

From Dev

Maven: How are artifacts built if they have their own dependencies?

From Dev

How can I show the old eth0 names and also rename network interfaces in debian 9 stretch?

From Dev

How to terminate Firebase thread in Spring MVC app

From Dev

How to script ElasticBeanstalk deployment for ASP.NET MVC app

From Dev

Location services popup in app built with old sdk

From Dev

Spring WebApplicationInitializer not working in wildfly 8.2.0 EAR Deployment

From Dev

Reordering the deployment artifacts in Glassfish App Server in IntelliJ IDEA

From Dev

How to control order of deployment (EJB first and then MBeans deployment) in Wildfly 8.2.0 AS

From Dev

JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

From Dev

Wildfly 9 - How do I exclude Jackson

From Dev

How to using @Scheduled(cron = "0 0/1 * * * *") automatically Generate xls report in Spring MVC

From Dev

Run spring boot app on Jboss Wildfly server

From Dev

How to import existing Maven + Spring MVC + Tomcat project on Intellij IDEA?

From Dev

How should I set Facebook app domains when I'm using cloud9 IDE?

Related Related

  1. 1

    spring boot hotswap with Intellij IDE

  2. 2

    How to terminate Firebase thread in Spring MVC app

  3. 3

    How to create Spring MVC application with Maven structure in Intellij IDEA 13.1?

  4. 4

    How to set deployment order of two ears in Wildfly

  5. 5

    WildFly - How To View Deployment

  6. 6

    Redistribute Intellij IDE GUI app

  7. 7

    Spring WebApplicationInitializer not working in wildfly 8.2.0 EAR Deployment

  8. 8

    Deployment failed on Wildfly 9

  9. 9

    Running a Spring MVC program in Intellij

  10. 10

    Spring MVC App runs in Eclipse but not Intellij - 404 Not Found

  11. 11

    How to configure Wildfly 9 to failover HTTP sessions

  12. 12

    JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

  13. 13

    Wildfly 9 - How do I exclude Jackson

  14. 14

    IntelliJ + Spring Web MVC

  15. 15

    IntelliJ + Spring Web MVC

  16. 16

    Maven: How are artifacts built if they have their own dependencies?

  17. 17

    How can I show the old eth0 names and also rename network interfaces in debian 9 stretch?

  18. 18

    How to terminate Firebase thread in Spring MVC app

  19. 19

    How to script ElasticBeanstalk deployment for ASP.NET MVC app

  20. 20

    Location services popup in app built with old sdk

  21. 21

    Spring WebApplicationInitializer not working in wildfly 8.2.0 EAR Deployment

  22. 22

    Reordering the deployment artifacts in Glassfish App Server in IntelliJ IDEA

  23. 23

    How to control order of deployment (EJB first and then MBeans deployment) in Wildfly 8.2.0 AS

  24. 24

    JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

  25. 25

    Wildfly 9 - How do I exclude Jackson

  26. 26

    How to using @Scheduled(cron = "0 0/1 * * * *") automatically Generate xls report in Spring MVC

  27. 27

    Run spring boot app on Jboss Wildfly server

  28. 28

    How to import existing Maven + Spring MVC + Tomcat project on Intellij IDEA?

  29. 29

    How should I set Facebook app domains when I'm using cloud9 IDE?

HotTag

Archive