Hotswap reloading the entire context once again

412 views
Skip to first unread message

Sreejiths S

unread,
Oct 24, 2016, 7:36:31 AM10/24/16
to HotswapAgent

Hi All,

I am starting the tomcat server by passing the below params

set CATALINA_OPTS=-Xms512M -Xmx1024M -XXaltjvm=dcevm -javaagent:d:\programs\hotswap-agent-0.4.0-SNAPSHOT.jar


I starts the server by catalina jpda start

with autoHotswap=false in hotswap-agent.properties

When i starts tomcat , i gets the below

HOTSWAP AGENT: 16:51:5.048 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {0.4.0-SNAPSHOT} - unlimited runtime class redefinition.
Dynamic Code Evolution 64-Bit Server VM warning: JSR 292 is disabled in this JVM.  Use -XX:+UnlockDiagnosticVMOptions -XX:+EnableInvokeDynamic to enable.
HOTSWAP AGENT: 16:51:5.292 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.watchResources.WatchResourcesPlugin' initialized in ClassLoader 'sun.misc.Launcher$AppClassLoader@2edad4b8'.
HOTSWAP AGENT: 16:51:5.293 INFO (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Registering directory target D:\programs\apache-tomcat-7.0.42\webapps\tops-1.0.0\WEB-INF\classes\META-INF via watched: D:\programs\apache-tomcat-7.0.42\webapps\tops-1.0.0\WEB-INF\classes
HOTSWAP AGENT: 16:51:5.310 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Deltaspike, ELResolver, Gae, Hibernate3JPA, Hibernate3, Hibernate, Hotswapper, JavaBeans, JBossModules, Jersey2, Jetty, Mojarra, MyFaces, AnonymousClassPatch, Log4j2, Logback, OsgiEquinox, Proxy, Resteasy, ResteasyRegistry, Seam, Spring, WatchResources, WebObjects, Weld, WildFlyELResolver, ZK]
Listening for transport dt_socket at address: 8000



In the class level , D:\programs\apache-tomcat-7.0.42\webapps\tops-1.0.0\WEB-INF\classes i replaced one of my old class withe new class ,

But reloads the entire application once again , not hotswapping that particular class itself . any thougths ?

"Reloading context with name / started , ... "


I am using spring 3.2.3 , hibernate 4.3.6 , logback

vladimir dvorak

unread,
Oct 25, 2016, 1:41:15 AM10/25/16
to HotswapAgent
It looks like you have defined reloadable context for your application. It can be defined in ROOT.xml or in IDE (eclipse) as well.

Sreejiths S

unread,
Oct 25, 2016, 3:20:41 AM10/25/16
to HotswapAgent
HOTSWAP AGENT: 10:50:15.249 ERROR (org.hotswap.agent.watch.nio.
EventDispatcher) - No match for  watch event 'sun.nio.fs.AbstractWatchKey$Event@5a31241c', and then it reloads ..

i didnt mentioned reloadable context . If it is there , where can i cross check
also not using any IDE for this purpose .

vladimir dvorak

unread,
Oct 25, 2016, 9:38:43 AM10/25/16
to HotswapAgent

Does it reload the servlet without HotswapAgent?

Sreejiths S

unread,
Oct 26, 2016, 9:41:14 AM10/26/16
to HotswapAgent
Yes , there i found one configuration , in context.xml , <Context reloadable="true">

i changed this to <Context reloadable="false">   , now its not reloading

But i problem i faced is , i configured in the hotswap.properties ,

extraClasspath=D:/programs/apache-tomcat-7.0.42/webapps/app1/WEB-INF/classes/com/app1

in the log , i can see
 Registering directory target D:\programs\apache-tomcat-7.0.42\webapps\app1\WEB-INF\classes\com\app1 via watched:

but , when ever i tries to change the classes inside the above folder , i gets the below error ,


ERROR (org.hotswap.agent.watch.nio.
EventDispatcher) - No match for  watch event 'sun.nio.fs.AbstractWatchKey$Event@5a31241c



disabledPlugins=Hibernate,Tomcat,Spring
Message has been deleted

Jiří Bubník

unread,
Oct 26, 2016, 12:45:00 PM10/26/16
to Sreejiths S, HotswapAgent

Hi, extraClasspath should be a valid classpath, not a package - e.g.

extraClasspath=D:/programs/apache-tomcat-7.0.42/webapps/app1/WEB-INF/classes

 

Jiri

--
You received this message because you are subscribed to the Google Groups "HotswapAgent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hotswapagent...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages