Closed achimmihca closed 3 years ago
Hi, it is definitely HotswapAgent issue. I'm not expert on JSP loading, but we had several issues with JSP in the past. There are some related threads on google groups https://groups.google.com/g/hotswapagent/search?q=JasperLoader. Could you please create a new issue in HotswapAgent (look if there is some similar) and write your finding there?
I try to use the hot-swap feature on a multi-project Maven web app. We use Tomcat as Servlet Container.
When I do a Build > Rebuild in IntelliJ, it is telling me "142 classes reloaded" in a green notification bubble. So far so good. Yet, when I continue to use the webapp, I get the following Exception. (Note that I replaced actual class and file names with TheClass, TheReturnValueClass, and the_jspfile.jsp)
Note that the code change that I wanted to hot-swap is neither in TheClass, nor in TheReturnValueClass nor in the JSP file. I guess the classes where the error occurs are among the 142 changed classes. Maybe they are updated but not all compiled JSP files use this new definition?
Note further that the TheClass and TheReturnValueClass are part of a lib project, not the main project. Maybe this is a reason why the class definition is not updated correctly? Maybe it is not updated everywhere (in a JAR built from another project)?
JVM Version I use the newest release of hotswapagent, namely Dcevm-11.0.9+1 (2020-11-24) In IntelliJ I configured additional VM-argument for Tomcat "-XX:HotswapAgent=fatjar".
Tomcat Plugin My logs show
So I guess the DECVM is started and I am also using Tomcat plugin.
hotswap-agent.properties
I have a hotswap-agent.properties file where I added the compiled output location of classes from my plugins. Consider my project structure to be like
theproject | - libproject | - mainproject
I have
Note that the path is a little weird because I am using a Maven property, i.e.,
${project.basedir}\\..\\libproject\\target\\classes;\
and ${project.basedir} points to mainproject. Are relative paths allowed in extraClasspath? How can I check that hotswap-agent.properties is working as intended?Conclusion
Am I missing some config, is it a bug, or is it a limitation of the DECVM hot-swap features?