AnsweredAssumed Answered

Problem with hot-reloading using HotSwapAgent

Question asked by zlucy82 on Dec 12, 2018

Hi all,
i have a problem with HotSwapAgent for Alfresco Community 5.2 and SDK 3.

I followed these steps (based on Using HotSwapAgent | Alfresco Documentation tutorial).


1. i checked my java version that is "1.8.0_161"
2. i downloaded the jar hotswap-agent-1.0-sources.jar and put it in /Users/zarbano/my-packages/hot-reloading/, then i renamed it into hotswap-agent.jar (i used the 1.0 version because higher versions generate exceptions).
3. i downloaded the DCEVM Java Patch for my java version "DCEVM-8u152-installer.jar" (i tried also DCEVM-8u172-installer.jar)
4. i launched the installer with "sudo java -jar DCEVM-8u152-installer.jar"
5. i selected my java installation "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home" and clicked on "Install DCEVM as altjvm"
6. i generated my all-in-one project with alfresco sdk3 (aio-hotR-test) 
7. i copied from aio-hotR-test/src/test/resources to aio-hotR-test/aio-hotR-test-platform-jar/src/main/resources
8. i renamed aio-hotR-test/aio-hotR-test-platform-jar/src/main/resources/ into aio-hotR-test/aio-hotR-test-platform-jar/src/main/resources/
9. i changed my file in this way:

   MAVEN_OPTS="-Xms256m -Xmx2G -javaagent:/Users/zarbano/my-packages/hot-reloading/hotswap-agent.jar XXaltjvm=dcevm" mvn clean install alfresco:run


9. i runned the script
10. After the application started, i changed the java class ( of helloword webscript sample, then i moved into aio-hotR-test/aio-hotR-test-platform-jar/ and run "mvn compile". The compilation works fine but when i refresh my browser, nothing happens.


I attached three logs files:

  • hotswap-agent-output-start.txt (log generated when application starts)
  • hotswap-agent-output-compile.txt (log generated when i compile the java class of the hello world webscript in the platform project)
  • hotswap-agent-output-run.txt (log generated when i run the sample "hello world" webscript (with java class modified))
  • DCEVM-install.png (screenshot of the installation of DCEVM )


What am I wrong? Can someone help me?

Thank you very much!