I'm have the exact same problem on jboss 3.0.6/Tomcat 4.1.18.
I actually gave up on this two months ago. A redeploy is
a jboss restart for me,
I suspect struts (using v 1.0) has something to do with it
because it was causing weird classloading behaviour with
jboss 2.4.x, too.
I tried this procedure:
1. manually undeploy ear.
2. delete unpacked ear from tmp
3. deploy ear again
Result: nothing, somehow a class is still found in the VM from the previous deployment...
Still looking for clues...
I'm monitoring jboss-user as well so I'll pick up any posts there. Just seems that the list is still busier than the forums...
You mentioned in your procedures that you
"delete unpacked ear from tmp". When I redeploy my application, the app server tries to delete the previous tmp file and I get the following message in the server.log file:
could not delete directory file:/C:/jboss-3.0.4_tomcat-4.1.12/server/default/tmp/deploy/server/default/deploy/ossweb.war/104.ossweb.war restart will delete it.
Also, If I do as you mentioned, delete my application manually so it will undeploy (log file still gives the same message) and then try to delete the tmp file manually too, I get the following message in a Windows dialog:
Cannot delete 104.ossweb: There has been a sharing violation. The source or destination file may be in use.
The VM apparently has it locked for some reason.
I've also read posts that mention using jdk 1.4.1 becuase they have better classloaders and such, but that produces no different results.
Please notify me of any progress you make on this topic.
I solved my own problem after 2 months of looking.
Struts is the issue.
I could not get this error to occur when using straight Servlets, so it made me put my focus on struts. i'm currently using Struts 1.0.2.
I downloaded the RC1 of Struts 1.1 and ran my same code using it and this problem did not happen. Hot deploy is now working.
JBoss and/or Tomcat were not the issue.
I am not sure if you really solved your problem. I have a similar problem with JBoss 3.1.2. The only difference is that the class which is not reloaded correctly is my own extension of one of the Log4j classes. The behavior is the same as you have described in your first message opening this thread. I was experimenting, before I found this discussion - my trace statements are very similar to those in your first message.