I have a problem w HotSwap Agent. It is not working correctly.

Setup:

  • JDK 11 from HotswapAgent.org
  • Widlfly 14
  • NetBeans 9
  • HotSwapAgent 1.3.1-SNAPSHOT

On start i

HOTSWAP AGENT: 08:17:59.098 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited runtime class redefinition.

In the middle i get a strange:

08:18:56,713 INFO [stdout] (ServerService Thread Pool -- 77) HOTSWAP AGENT: 08:18:56.713 WARNING (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Unable to watch for path vfs:/C:/Java/wildfly-14.0.0.Final/bin/content/application.war/WEB-INF/classes/com/company/, not a local regular file or directory.

But it goes further ok. I change code, click apply code chages. It seemingly changes the code:

Classes to reload:
 com.company.web.HeaderPanel$13
 com.company.web.HeaderPanel$2
 com.company.web.HeaderPanel$3
 com.company.web.HeaderPanel$4
 com.company.web.HeaderPanel
 com.company.web.HeaderPanel$5
 com.company.web.HeaderPanel$10
 com.company.web.HeaderPanel$11
 com.company.web.HeaderPanel$1
 com.company.web.HeaderPanel$12
 com.company.web.HeaderPanel$6
 com.company.web.HeaderPanel$7
 com.company.web.HeaderPanel$8
 com.company.web.HeaderPanel$9

Code updated

In runtime it then throws an incompatible class change error when i go to the changed class:

java.lang.IncompatibleClassChangeError: Type com.company.web.HeaderPanel$1 is not a nest member of com.company.web.HeaderPanel: current type is not listed as a nest member
    at deployment.application.war//com.company.web.HeaderPanel$1.onConfigure(HeaderPanel.java:110) 

The relevant source code line is a overriden function in an anonymous class, the super. call:

 @Override
 protected void onConfigure() {
    super.onConfigure(); 
    setVisible(!ssoService.isEnabled());
 }

It is not the line i modified. I modified an completely different line.

0

There are 0 best solutions below