As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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 classesat 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 methodat 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
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.
Hi Krutik,
I am only modifying code under executeImpl() method of sample webscript, then also it is giving above error.
The Error says that you have added new method in java class.Have you applied patch to JDK?