-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HotswapAgent don't pickup new mapping and new class in spring boot #465
Comments
Are you using |
I add this arg but but nothing changes hotswap-agent.properties(under resource directory): |
Is it working if you use internal HA using |
I change my jdk and use jbr17 with IDEA. everything is ok when use above config with IDEA. hotswapAgent doesn't detect changes.(when I change method body its detect it but when I create new method with @GetMapping, doesn't detect) |
When I change method body, tomcat log: When I add new method with @GetMapping, tomcat log: |
I have no problem with your project, HA detected |
I don't wnat using debugger(I try to load new class or change class at runtime same as production). also I set extraClassPath and watchResources in properties file : extraClasspath=F:\apache-tomcat-9.0.73\webapps\test but When I copy new .class in test and test1 directory, HA Idoesn't seem to do anything(nothing in tomcat log) HA only works when method body changes(but When I use IDEA everything works and no problem) |
If it works only if you change method body, then you are probably not using dcevm. |
I do test with -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar but There was no difference and When I change in tomcat webapp directory, tomcat log: |
I face the same situation, |
Hi
I create simple spring boot application with @RestController and @GetMapping annotation
I use Dcevm-11.0.15+1 and tomcat 9 outside ide with this args:
-javaagent:C:\jdk\dcevm-11.0.15\lib\hotswap\hotswap-agent.jar=autoHotswap=true
If I change existing method body everything is ok and woks(but in log file see error:
HOTSWAP AGENT: 02:04:57.101 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - flushClassInfoCache() exception Unable to make field private static final com.sun.beans.util.Cache com.sun.beans.introspect.ClassInfo.CACHE accessible: module java.desktop does not "opens com.sun.beans.introspect" to unnamed module @12468a38.
If I create new method with @GetMapping hotswapagent detect and reload :
HOTSWAP AGENT: 02:04:57.101 RELOAD (org.hotswap.agent.config.PluginManager) - Reloading classes [com.hnp.myapp.FirstController] (autoHotswap)
but new @GetMapping not working
also If I add new class, hotswapAgent don't detect it
my simple app:
https://github.com/hnpanther/myapp
The text was updated successfully, but these errors were encountered: