aspose file tools*
The moose likes JBoss/WildFly and the fly likes Webapp redeploy in jboss-4.0.2 is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Webapp redeploy in jboss-4.0.2 is not working" Watch "Webapp redeploy in jboss-4.0.2 is not working" New topic
Author

Webapp redeploy in jboss-4.0.2 is not working

naresh pasnur
Greenhorn

Joined: May 29, 2001
Posts: 9
Touching or changing content in the web.xml file of my webapp is not redeploying the webapp.
Can someone please help me with this issue ?

thanks in advance.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

Which Operating System? Where are you changing the web.xml, in an IDE or directly in the deploy/.war directory? And why JBoss AS 4.0.2, which is a very ancient version?

[My Blog] [JavaRanch Journal]
naresh pasnur
Greenhorn

Joined: May 29, 2001
Posts: 9
It's not in the IDE. It's on a linux server.
This is my folder structure:
jboss-4.0.5\server\default\deploy\mywebapp.war\WEB-INF\web.xml.
Restarting the server redeploys the webapp but I don't want to restart every time I make a change to the webapp.
Touching the webapp normally redeploys the webapp.
naresh pasnur
Greenhorn

Joined: May 29, 2001
Posts: 9
This is something related to Jboss class loading mechanism.
Does anyone know where does in the jboss server, the information regarding loading of the classes of the .war is specified ?
I have to restart jboss whenever I make changes to the classes of the webapp.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Try this (it's a little drastic, but beats a restart): remove the web app from the deploy directory, wait a few seconds for the app to be undeployed. Then move the app back in.

Usually, changing the timestamp on WEB-INF/web.xml is supposed to redeploy the app. But then classloading issues do tend to crop up.


JBoss In Action
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

In addition to what Peter suggested, also make sure that you have hot deployment enabled on that server instance. The flags that control hot deployment in AS4 are in JBOSS_HOME/server/< servername>/conf/jboss-service.xml:


Make sure, ScanEnabled is true and the ScanPeriod is set to your expected value.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

naresh pasnur wrote:This is something related to Jboss class loading mechanism.
Does anyone know where does in the jboss server, the information regarding loading of the classes of the .war is specified ?
I have to restart jboss whenever I make changes to the classes of the webapp.


Oops, I actually missed this post of yours. What exactly is the problem with classloading? By the way, you haven't answered why you are using JBoss AS 4.0.x.

naresh pasnur
Greenhorn

Joined: May 29, 2001
Posts: 9
Thanks guys for your responses.
The hot deployment is enabled on that server instance and that is ruled out.
The reason why I'm using Jboss4.0.2 and not recent versions because upgrading it involves too much complications.
I work for a company and they have many websites hosted on this server. They have to keep their websites up and running 24/7.
I haven't tried with Peter's suggestion yet but will do it tonight when the traffic is less.
What's is the sequence of steps when a timestamp on web.xml is changed ?

Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Webapp redeploy in jboss-4.0.2 is not working