I am a teaching fellow for a J2EE class at the Harvard Extension this semester and we are using the JBoss Application Server v. 4.0.1. Today, while examining homework assignment submissions one of my peers sends me an EAR file asking me to try and deploy it. All EAR files for the assignment are expected to have the same name.
JBoss is supposed to allow you – assuming the EAR file is correctly packaged – to simply copy the EAR file into its $JBOSS_HOME/server/default/deploy
and have it install the application automatically. An application with the same name as an application already there is supposed to overwrite the application that was already there.
Sure of that, I go ahead and overwrite the existing application EAR file. JBoss’ console shows that the application deployed OK and was started. I hence try to access the application in its URL and lo and behold – I get the JSP welcome page of the application I just deleted! OK… I follow the procedure that was developed with pain and tears and stop JBoss, delete the application EAR file from the aforementioned deploy
folder; then proceed to delete anything with the same name as the EAR file from the $JBOSS_HOME/server/default/tmp/deploy
.
I started JBoss again, accessed the application URL and got, as I expected, a 404 error. Deployed the application again and whoa – the OLD application’s ghost was still present – I got the old application’s welcome JSP page. This is WEIRD.
An e-mail flurry ensues, we research feverishly, until co-TF Martin comes up with the answer (documentation shmocumentation…): There is also a $JBOSS_HOME/server/default/work/jboss.web/[SERVER_NAME]/
folder which contains a folder for each of the deployed applications. It appears that the accessed JSPs are converted into classes there. A quick deletion of that folder solves the problem completely and the new application finally rears its pretty head. THANKS MARTIN!