Old deployment being cached in IntelliJ always complaining with FileNotFoundException on Maven project when version upgraded (WildFly 31 as server)

已回答

Hello all.

I have a problem with IJ somehow caching the old version of my locally deployed WAR deployment in WildFly 31.0.0.Final.

It doesn't go away, complaining about an old WAR file not being present.

Here's the stacktrace when starting the server + executing the deployment:

C:\dev\servers\wildfly-31.0.0.Final\bin\standalone.bat
C:\dev\java\jdk-11.0.16.1\bin\java.exe -Dfile.encoding=windows-1252 -classpath C:\Users\Kawu\AppData\Local\Temp\classpath1571164443.jar com.intellij.javaee.oss.process.JavaeeProcess 53550 com.intellij.javaee.oss.jboss.agent.WildFly28Agent
Calling "C:\dev\servers\wildfly-31.0.0.Final\bin\standalone.conf.bat"
[2024-03-27 11:42:50,308] Artifact bbstats:war exploded: Waiting for server connection to start artifact deployment...
"JAVA_OPTS already set in environment; overriding default settings with values: -Duser.language=en "
Detected server admin port: 9990
Setting JAVA property to "C:\dev\java\jdk-11.0.16.1\bin\java"
Detected server http port: 8080
===============================================================================
 JBoss Bootstrap Environment
 JBOSS_HOME: "C:\dev\servers\wildfly-31.0.0.Final"
 JAVA: "C:\dev\java\jdk-11.0.16.1\bin\java"
 JAVA_OPTS: "-Dprogram.name=standalone.bat -Duser.language=en  -Djdk.serialFilter=""  --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldaps=ALL-UNNAMED --add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED --add-opens="java.base/com.sun.net.ssl.internal.ssl"=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED "
===============================================================================
11:42:50,244 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.2.Final
11:42:50,555 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.2.Final
11:42:50,560 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
11:42:50,619 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 31.0.0.Final (WildFly Core 23.0.1.Final) starting
11:42:50,968 INFO  [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 2.2.3.Final
11:42:51,215 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 17) WFLYCTL0028: Attribute 'cluster' in the resource at address '/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
11:42:51,256 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
.
.
.
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content
    at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:78)
    at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
    ... 8 more
Caused by: java.io.FileNotFoundException: C:\projects\basketball-stats\target\bbstats-5.1.1 (Das System kann die angegebene Datei nicht finden)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at org.jboss.vfs@3.3.0.Final//org.jboss.vfs.spi.RootFileSystem.openInputStream(RootFileSystem.java:51)
    at org.jboss.vfs@3.3.0.Final//org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:318)
    at org.jboss.vfs@3.3.0.Final//org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533)
    at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:93)
    at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:74)
    ... 9 more
11:42:51,627 INFO  [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0493: Jakarta Enterprise Beans subsystem suspension complete
11:42:51,653 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
11:42:51,656 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 7.0.0.Final (Apache CXF 4.0.0) 
11:42:51,693 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "bbstats-5.1.1")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"bbstats-5.1.1.war\".STRUCTURE" => "WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"bbstats-5.1.1.war\"
   Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content
   Caused by: java.io.FileNotFoundException: C:\\projects\\basketball-stats\\target\\bbstats-5.1.1 (Das System kann die angegebene Datei nicht finden)"}}
11:42:51,697 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "bbstats-5.1.1" (runtime-name : "bbstats-5.1.1.war")
11:42:51,698 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."bbstats-5.1.1.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "bbstats-5.1.1.war"
11:42:51,733 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
11:42:51,737 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
11:42:51,737 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
11:42:51,738 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 31.0.0.Final (WildFly Core 23.0.1.Final) started (with errors) in 1723ms - Started 282 of 525 services (1 services failed or missing dependencies, 317 services are lazy, passive or on-demand) - Server configuration file in use: standalone.xml
 

End of the stacktrace:

11:42:59,375 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1021: [/bbstats] Configuration option 'com.sun.faces.displayConfiguration' - ENABLED
11:42:59,375 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1021: [/bbstats] Configuration option 'com.sun.faces.validateXml' - DISABLED
.
.
.
11:42:59,377 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1018: [/bbstats] Configuration option 'jakarta.faces.FACELETS_REFRESH_PERIOD' set to '2'
11:42:59,377 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1018: [/bbstats] Configuration option 'jakarta.faces.VALIDATE_EMPTY_FIELDS' set to 'auto'
11:42:59,377 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1018: [/bbstats] Configuration option 'jakarta.faces.CLIENT_WINDOW_MODE' set to 'none'
11:42:59,377 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1018: [/bbstats] Configuration option 'jakarta.faces.WEBAPP_RESOURCES_DIRECTORY' set to '/resources'
11:42:59,378 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) JSF1018: [/bbstats] Configuration option 'jakarta.faces.WEBAPP_CONTRACTS_DIRECTORY' set to '/contracts'
11:42:59,384 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) Initializing Mojarra 4.0.5 for context '/bbstats'
11:42:59,933 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 12) Monitoring file:/C:/projects/basketball-stats/target/bbstats-5.1.3/WEB-INF/faces-config.xml for modifications
11:42:59,953 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 12) Running on PrimeFaces 12.0.0
11:43:00,213 INFO  [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 12) RESTEASY002225: Deploying jakarta.ws.rs.core.Application: class io.kawoolutions.bbstats.framework.webservice.JaxRsActivator$Proxy$_$$_WeldClientProxy
11:43:00,243 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 12) WFLYUT0021: Registered web context: '/bbstats' for server 'default-server'
11:43:00,284 INFO  [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0010: Deployed "bbstats-5.1.3" (runtime-name : "bbstats-5.1.3.war")
11:43:00,285 INFO  [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."bbstats-5.1.1.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "bbstats-5.1.1.war"
[2024-03-27 11:43:00,292] Artifact bbstats:war exploded: Artifact is deployed successfully
[2024-03-27 11:43:00,292] Artifact bbstats:war exploded: Deploy took 7,465 milliseconds
 

I tried the following to get rid of the complaint:

1. Clear the app's target dir

2. Maven clean + package

3. IntelliJ “Invalidate Caches…” and restart  (clear file system cache and local history checked)

4. Removed the artifact from the service and readd

5. Manually cleared out WildFly standalone/deployment dir

6. Manually remove the artifacts from the project and have them be recreated by Maven as in https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006848980-Deployable-Artifacts-in-Maven-project-not-updating-when-versions-change?page=1#community_comment_4989392811922

None of the above worked.

 

Does anyone know how to get rid of this, seemingly cached, old version?

Maybe some solution without having to delete the whole .idea dir??

 

Thanks

Karsten

0

Hello,

Please clean “deployments” section in standalone.xml configuration file inside of jboss installation:

    <deployments>
        <deployment name="application-1.0-RELEASE.war" runtime-name="application-1.0-RELEASE.war">
            <fs-archive path="APPLICATION_DIRECTORY\target\application-1.0-release.war"/>
        </deployment>
    </deployments>

 

1

This worked! Thanks so much.

0

You are welcome!

0

请先登录再写评论。