HotswapAgent on Wildfly 9.1

929 views
Skip to first unread message

Edward Legaspi

unread,
Oct 12, 2015, 11:23:22 AM10/12/15
to HotswapAgent
Hi, I'm currently trying HotSwapAgent on Wildfly9.1 but can't figure it out yet. I tried the instructions here: http://tirthalpatel.blogspot.com/2014/06/steps-to-setup-hotswap-agent-in-eclipse.html (although this is for tomcat). I disabled eclipse automatic publishing and deploy the primefaces-jsf example jar from github. On deployment I got:

23:19:13,166 INFO  [stdout] (Thread-342) HOTSWAP AGENT: 23:19:13.166 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.hotswapper.HotswapperPlugin' initialized in ClassLoader 'ModuleClassLoader for Module "deployment.primefaces-jsf.war:main" from Service Module Loader'.
23:19:13,358 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 114) WFLYUT0021: Registered web context: /primefaces-jsf

But changing any files doesn't update the deploy war.

Any idea why? Thanks.

vladimir dvorak

unread,
Oct 14, 2015, 3:59:07 PM10/14/15
to HotswapAgent
1. Check if you have "Automatically publish when resource changed" selected in server configuration.
2. Check if changed class files are copied into wildfly's "standalone/deployments/" directory. If not something in the deployment is wrong
3. If classes are updated then check if you have -XXaltjvm=dcevm

Edward Legaspi

unread,
Oct 14, 2015, 9:58:13 PM10/14/15
to HotswapAgent
Hi,

Thanks for the reply, I've already tried with #1 set. Yes it does work but isn't that the work of eclipse auto publish?
2.) Yes files are copied and updated.
3.) Classes are updated and yes I have that server argument.

So with this settings it will work (I thought need to set auto publish to false for hotswapagent to kick-in). But how about if I'm working on multi-module environment? How do we set it? For example I have:
main-project
-sub-project1
-sub-project2

If I want to monitor sub-projects 1 & 2, what value should I put in extraClassPath?

Jiří Bubník

unread,
Oct 15, 2015, 2:11:54 AM10/15/15
to Edward Legaspi, HotswapAgent

--
You received this message because you are subscribed to the Google Groups "HotswapAgent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hotswapagent...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Legaspi

unread,
Oct 16, 2015, 9:52:29 AM10/16/15
to HotswapAgent, czet...@gmail.com
Hi,

Thanks for the reply.

I'm now using the multi-maven feature as suggested. It seems like we can set multiple entries in extraClassPath using comma ,. Is that correct?

But now whenever I change a class I have:

"java.lang.NoClassDefFoundError: org/jboss/weld/annotated/slim/SlimAnnotatedType".

Any idea?

Thanks.

vladimir dvorak

unread,
Oct 16, 2015, 2:20:47 PM10/16/15
to HotswapAgent, czet...@gmail.com
Try the last version from repository. I did some fixes in Weld plugin after 0.3 release. Wildfly/weld has a problem with EJB now, if you don't use EJB it should work.

Edward Legaspi

unread,
Oct 16, 2015, 9:19:03 PM10/16/15
to HotswapAgent, czet...@gmail.com
Sadly that's already the version I'm using right now. And yes I'm using EJB. My project is defined this way:

web
-ejb
-model

vladimir dvorak

unread,
Oct 17, 2015, 2:38:14 AM10/17/15
to HotswapAgent, czet...@gmail.com
You can disable Weld plugin in hotswap-agent.properties at last. You lost possibility to change injection etc. Or you can use dcemv alone. To fix EJB in Weld looks not to be strightforward now and additionaly I don't use EJB on daily basis.
Reply all
Reply to author
Forward
0 new messages