Frage

I have a problem. I start Tomcat in JPDA mode, and after that I execute:

mvn tomcat:stop tomcat:undeploy war:inplace tomcat:inplace

After which I connect to remote Java app from Eclipse. All works ok, I'm able to change some code and hot swap works.

When I add method/change parameters I redeploy the app:

mvn tomcat:stop tomcat:undeploy war:inplace tomcat:inplace

After which when I reconnect to the remote java app again, only now when I change any file (for example, placing a space or removing space, save) I get an error that code cannot been swapped out - "Hot Code Replace Failed - add method not implemented".

What is the problem?

Thanks.

War es hilfreich?

Lösung

JVM only supports hot swap for changes to the method body. For other changes, like changing the parameters or adding new methods, consider choosing JRebel which supports these.

Andere Tipps

The Spring Loaded JVM agent should work better. For one, it has the new parameters and methods feature that is lacking with current JVM hot code replace. I recently got this setup and verified that new methods in existing classes work as expected.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top