It seems like some class didn't unload properly from the JVM. This tends to happen a lot with Struts but it also happens with anything that the JVM understands to be still in use - that is; an active instance of the class remains in use in the JVM.
For your issue, you might be able to get around it by deploying the Struts framework separate to your WAR. YMMV.
Your other option is to track down the class unloading problem and work out what is holding the instance in memory. For a very large application, the effort is usually not worth it.
Otherwise, stopping and restarting JBoss is the other alternative.
Hope that helps and that I have the right of the situation.
Thanks Jonlee for your reply.
Yes, for sure there is something not unloading here, but what, why, where etc? And the problem is not that simple, I have stopped/started the server already and the result is the same! In my browser is running now an application from 3 days ago, I cannot see any change I did in the last days, even one as small as commenting/uncommenting or introducing a new test line (a simple System.out.println).
I've tried to use the debugger in Eclipse step by step and every time when I get to the new code, it is ignored, as if it was not there...
I changed the jdk (I was using BEA) to SUN 1.4.1_07 (tried even with 1.4.2) - no result.
Does JBoss keep some cache of applications?
Also, does anybody know about a solution to the "hot code replace" problem that I saw on forums many people have? Nobody has given a good answer until now. For any change I made in code, however small it is and not affecting the class structure (for example the commenting of a System.out.println line) after saving, I get a message box stating: org.jboss.Main at localhost:xxxx (may be out of synch) was unable to replace the running code with the code in the workspace. Reason: Hot code replace failed - Scheme change not implemented
Some people say it is the jdk - I tried 1.3, 1.4.1, 1.4.2 etc, so no - others say is the changes in class structure - see above, only a comment changed, so no!
Problem solved... Of course, I was the stupid one, not JBoss... Having separate projects for EJB and WEB, my ejb deployment script was including by mistake the web compiled classes. I tested and deployed the EJB module 3 days ago and not touching it since, so it was normal the web classes to be the old ones... Although, when I open the application in browser, shouldn't the classes called be the ones in the WAR and not the ones in the ejb JAR? Anyway, everything is working now.
The problem with the hot code replace still remains.
Have a look at the classloading comments in JBOSS_HOME/examples/dtd/jboss-web_3_2.dtd for information, in particular around the line, <class-loading java2ClassLoadingCompliance='false'/>. There are also quite a number of posts in the forums discussing this.
The hot deployment issue is as I have originally described. Try moving Struts out of the WAR and deployed in lib or similar tricks. There might be several "support" libraries you need to move out before you can hot deploy your application. That is generally the easiest solution.
Did you found a solution to your "hot code replace" problem. Im also encounting the same problem. If u have any idea please help me out.
thanks in advance,