Search code examples
intellij-ideatapestry

Tapestry hot swap in Intellij is not working for changes done in java class


In Tapestry(5.0) when ever I try to recompile my changes in java class i get a popup saying

Hot Swap Failed
abc.xyz : hierarchy changes not implemented
abc.xyz : Operation not supported by the VM

AFAIK this should be working and because of this I end up restarting the debug session which takes quite a bit of time. Any help with this ?


Solution

  • You see this warning, because IntelliJ is failing to hot swap the classes, because, as the message says: VM doesn't support this operation for your changes.

    What Tapestry is doing is actually not a hot swap, it's called "Live Class Reloading".

    In short: instead of updating existing classes and objects inside VM (what hot swap is doing), Tapestry throws old classes away with all their state, and loads/initialises them again using a custom class loader. It can only do this for its managed classes: page/component/mixin classes and IoC service implementations that are registered using service interface. Everything else can only be reloaded with a hot swap if it's implemented by a VM.

    You can read more details about Live Class Reloading in official documentation .