Skip to content
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 not working and throws "<CLASS_PATH> not valid, removing path=" #377

Open
engr-Eghbali opened this issue Nov 18, 2020 · 3 comments

Comments

@engr-Eghbali
Copy link

engr-Eghbali commented Nov 18, 2020

Hi folks, I’m facing an issue and I could use some help, please.
My ENV:

Dcevm-11.0.9+1 (2020-11-24)
Intellij 202.6397.94
Centos7
Spring-Boot 2.1.6.RELEASE

And I followed these guides :
https://github.com/HotswapProjects/HotswapAgent
&
https://github.com/TravaOpenJDK/trava-jdk-11-dcevm

What I get after recompile my classes is like:

HOTSWAP AGENT: 19:49:11.740 WARNING (org.hotswap.agent.watch.nio.WatcherNIO2) - Watcher on <PATH_TO_MY_CHANGED_CLASS> not valid, removing path=

And my services not updating.
I traced the source code and found this if it's related:

// reset key and remove from set if directory no longer accessible
        boolean valid = key.reset();
        if (!valid) {
            LOGGER.warning("Watcher on {} not valid, removing path=", keys.get(key));
            keys.remove(key);

In addition, if it helps, I attached a part of the application logs on start.


HOTSWAP AGENT: 19:44:12.986 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.spring.SpringPlugin' initialized in ClassLoader 'jdk.internal.loader.ClassLoaders$AppClassLoader@3b192d32'.
HOTSWAP AGENT: 19:44:12.987 INFO (org.hotswap.agent.plugin.spring.SpringPlugin) - Spring plugin initialized - Spring core version '5.1.8.RELEASE'

2020-11-18 19:44:13.261  INFO 31796 --- [           main] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-11-18 19:44:13.262  INFO 31796 --- [           main] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
HOTSWAP AGENT: 19:44:13.336 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.hibernate.HibernatePlugin' initialized in ClassLoader 'jdk.internal.loader.ClassLoaders$AppClassLoader@3b192d32'.
HOTSWAP AGENT: 19:44:13.647 INFO (org.hotswap.agent.plugin.spring.SpringPlugin) - Registering basePackage com.wow.hrmanagement.*
HOTSWAP AGENT: 19:44:13.885 INFO (org.hotswap.agent.plugin.spring.SpringPlugin) - Registering basePackage com.wow.commons.*

HOTSWAP AGENT: 19:44:16.339 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.tomcat.TomcatPlugin' initialized in ClassLoader 'TomcatEmbeddedWebappClassLoader
  context: ROOT
  delegate: true
----------> Parent Classloader:
jdk.internal.loader.ClassLoaders$AppClassLoader@3b192d32
'.
HOTSWAP AGENT: 19:44:16.339 INFO (org.hotswap.agent.plugin.tomcat.TomcatPlugin) - Tomcat plugin initialized - Tomcat version '9.0.21.0'

@skybber
Copy link
Contributor

skybber commented Nov 19, 2020

Are you using autoHotswap and extraClassPath?

@engr-Eghbali
Copy link
Author

@skybber No sir...

@coelhodeoliveira
Copy link

coelhodeoliveira commented Mar 12, 2021

Hello, I also have a lot of those warnings:

HOTSWAP AGENT: 13:39:27.775 WARNING (org.hotswap.agent.watch.nio.WatcherNIO2) - Watcher on PROJECT_PATH not valid, removing path=

PROJECT_PATH is my is the full path to the file like /User/xxx/xxx/xxx

And I am using only the option "autoHotswap=true".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants