HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.32k stars 491 forks source link

Not hot deployment: Eclipse User operation is waiting #177

Open cristianchaparroa opened 7 years ago

cristianchaparroa commented 7 years ago

After remove a line of my code, or update a string text for more than one time, I get the Message User operation is waiting

user operation is waiting _008 Iḿ working with Java8, and I patched the DCEVM, This is the launch configuration for tomcat

-Dcatalina.base="/opt/tomcat9" -Dcatalina.home="/opt/tomcat9" -Dwtp.deploy="/opt/tomcat9/webapps" -Djava.endorsed.dirs="/opt/tomcat9/endorsed"
 -Xms1024m -Xmx1536m -XX:MaxPermSize=1536m
-XXaltjvm=dcevm -javaagent:/opt/hotswap/hotswap-agent-1.1.0-SNAPSHOT.jar
skybber commented 7 years ago

Did you try it with Tomcat8? We have no support for Tomcat9 yet.

skybber commented 7 years ago

I've checked HotswapAgent on Tomcat9 and it works. Did you configure hotswapping according documentation ?

cristianchaparroa commented 7 years ago

I understand that hotswap has support for 7/8 tomcat version so I configured with tomcat 7.075 and I get the following error selection_015

skybber commented 7 years ago

It looks you didn't configure dcevm, since this message is from standard JVM. Look at QuickStart

cristianchaparroa commented 7 years ago

Hi, I believe that I'm doing something wrong,

  1. This is the java version that I use

    openjdk version "1.8.0_111"
    OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2~bpo8+1-b14)
    Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-8, mixed mode)
  2. When I try to re patch the dcevm, I get the following selection_016 As you can see in the points 1,2 I've patched the dcevm,

  3. The following is the configuration of my tomcat server selection_017

selection_018

  1. When I start my application I get:

HOTSWAP AGENT: 17:32:23.076 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.1.0-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 17:32:23.925 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, WatchResources, AnonymousClassPatch, ClassInitPlugin, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, JavaBeans]
....
HOTSWAP AGENT: 17:38:19.448 INFO (org.hotswap.agent.plugin.tomcat.TomcatPlugin) - Tomcat plugin initialized - Tomcat version '7.0.75.0'
INFO: Server startup in 354004 ms
HOTSWAP AGENT: 17:38:19.945 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.elresolver.ELResolverPlugin' initialized in ClassLoader 'java.net.URLClassLoader@1ed1993a'.
  1. When I do some change in the code I get the Image above(the previous comment) with the mesage
    Hot code replace failed - VM may be inconsistent
    Timeout occurred while waiting for packet 54259.
skybber commented 7 years ago

It seems OK... What can be missing is this . You can check if dcevm is really running with "ps" command. There must be something wrong with it since dcevm code overrides the default hotspot's class redefinition. You can find out the source of your message here, but this code is not used in DCEVM (it can be explicitly used by argument) !

cristianchaparroa commented 7 years ago

I forgot that, thanks, but I get the following, obsolete methods on the stack _004

hot code replace failed _005

I got this message while I change the code and debug at the same time, it is ok?, or should I wait to run all the breakpoints, and release the debugger process, and after that, could I change the code?

skybber commented 7 years ago

It works in both situation, even if application is stopped at breakpoint as you wrote. Could you look at arguments application has if it is running ? Is there something like -client argument?

niro19 commented 7 years ago

Hi everybody,

I would like to replace the expensive JRebel with hotswapagent but I'm facing to the same problem as cristianchaparroa. All work fine when I start only one web project into my tomcat but when I start two web project I got this error (Hot code replace failed / Timeout occurred while waiting for packet...).

Do you have any idea to help me? Any help will be really appreciated!!

Thanks!