These are chat archives for HotswapProjects/user

17th
Jan 2018
Andreas Resios
@resios
Jan 17 2018 12:50

I'm trying to build the master branch for hotswap (mvn clean install -DskipTests) to get the latest patches but when I try to run it in the JVM I'm getting the following stacktrace:

HOTSWAP AGENT: 11:56:11.320 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field log
HOTSWAP AGENT: 11:56:11.322 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field savedBeers
HOTSWAP AGENT: 11:56:11.322 DEBUG (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Skipping old field nextBeerId
Exception in thread "Thread-19" java.lang.IllegalStateException: Unable to redefine classes
        at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:276)
        at org.hotswap.agent.plugin.hotswapper.HotswapperPlugin$1.executeCommand(HotswapperPlugin.java:94)
        at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:25)
Caused by: java.lang.UnsupportedOperationException: class redefinition failed: attempted to add a method
        at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
        at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:170)
        at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:272)
        ... 2 more

This seems similar with #162, but I've verified that the JVM has dcevm installed and it's used.
Also if I switch back to the latest official release, it starts working again.

I tried running mvn release:prepare release:perform but it fails to generate a jar file.
For building I'm using Oracle JDK 1.8.0_151
For running I'm using Oracle JDK 1.8.0_144

Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-2, mixed mode)

Any help would be appreciated.