Automatic HotSwap of Maven JEE project with Wildfly Server in IntelliJ not working

149 Views Asked by At

So I've recently joined a new company to support a legacy Java web application, and the current team uses Eclipse for development... which is fine, but if possible, I'd like to migrate to my preferred tool, IntelliJ. For the most part, it works, but the last niggle I have in my environment is the hotswap/automatic redeploys aren't working. Given that relaunching my local server takes up to a minute, this isn't ideal for quick development

If I run the server, either regularly or in debug mode, saving files doesn't seem to trigger the automatic build/deploy process. Going into the Run option, I can opt to Update classes and resources:

Update Classes and Resources

Which triggers a build, but unfortunately seems to error on the hot-swap deployment side:

15:36:26,159 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."project-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."project-ejb.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "project-ejb.jar"

Here's my Run/Debug config for running my Wildfly 18 server: JBoss Server Run/Debug Configuration Window

The only other non-default setting here is the Startup script, which is wildfly-18.0.0.Final/bin/standalone.sh -c standalone-full.xml

I've added the setting for auto-deploying exploded, like this, to my XML:

<deployment-scanner scan-interval="5000" auto-deploy-exploded="true" .../>

And these are the settings for my exploded artifact:

Artifact Structure

These are my Debugger->HotSwap settings: Debugger HotSwap settings

Any help or direction would be much appreciated - obviously I'm happy to answer any questions that might help diagnose the cause of my problems.

Thank you in advance for your help!

~ Alan

1

There are 1 best solutions below

0
Egor Klepikov On

Try to set Update Classes and resources or Hot swap classes in WildFly Run/Debug configuration for On frame deactivation and On Update action sections.

For example:

enter image description here

See https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html for more information