01-08-2018 06:51 AM
I am trying to achieve hot reloading by following this Using HotSwapAgent | Alfresco Documentation link.
After completing all steps when I am making changes in sample webscript java file it is giving following error and changes are not getting reflected.
Exception in thread "Thread-69" 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
Thanks,
Vikash
01-08-2018 07:16 AM
Hotswap agent does not support hot reloading when you modify the class defination..
For example , below changes will not hot reload the java file.
Below changes will get hot reloaded.
01-09-2018 12:12 AM
Hi Krutik,
I am only modifying code under executeImpl() method of sample webscript, then also it is giving above error.
01-09-2018 01:55 AM
The Error says that you have added new method in java class.Have you applied patch to JDK?
Explore our Alfresco products with the links below. Use labels to filter content by product module.