And I was truly lucky using hot deployments for Tomcat and JBoss so far up to Today when after installing Eclipse in my personal MAC I found out myself on the same boat:
Well, without getting into too much detail this happens when the Server is running classes that were not compiled with the same compiler Eclipse is using.
Hot code replace failed - Scheme change not implemented
Of course you need to run your application server with the below flags (>=JDK 5)to be able to connect to a debug port and hot deploy:
JAVA_OPTS="$JAVA_OPTS -Xdebug -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
But wait a second, why it did not happen to me before? It turned out to be the way I usually worked:
1. I use Maven to build from command prompt and the Maven Eclipse Plugin to build from Eclipse.
2. I have Eclipse building automatically and the compiled code goes into the Maven target directory.
3. I deploy into Tomcat / JBoss using custom maven profiles and I do run them from command prompt.
The above configuration would fail to "hot code replace" so what do I do different on my workplace MAC?
In my workplace I use a local Ubuntu VM running on my MAC and there I have a script that will *not* clean the target when building. I was trying maven using the clean option in my personal MAC and so my compiler was different from the one in use by Eclipse.
So if we are sure that we never clean from Maven but only from Eclipse the steps above will work amazingly good. Now I know why my crew was suffering and for sure they will get more Agile from now on.