views:

47

answers:

2

I'm running JBoss as a server started from within Eclipse. I have a strange problem where turning on automatic publishing (so the ability to hot deploy a class while debugging, etc.) causes the war to redeploy. When it redeploys it's over 3 times the size of what it was originally. Has anyone seen this? I'd like some method to update Java classes faster. This seemed like the solution, but obviously it's causing problems.

This larger war file won't properly deploy the web.xml and hitting the URL for the application will simply show a directory listing.

A: 

I've had trouble in the past with old .war files getting accidentally nested within the new one. Might be what's happening to you. Check the contents of the large .war to make sure it doesn't have the small .war inside it.

DeathB4Decaf
A: 

Grab the old and new versions and compare. If you've got bash, try to compare the archives using

jar tvf old_archive.war | sort > old
jar tvf new_archive.war | sort > new
diff old new

(I've not got bash to hand right now, so can't check my syntax).

This won't tell you why, but it will tell you what is growing.

Synesso
That was helpful. So here is what I get.
Preston Crawford
Well, I get two completely different organizational structures. The old one has a bunch of jsps in the root and then a WEB-INF folder. The new one is missing those fields and simply has WEB-INF, build (probably the overhead), etc. Strange that that's the way it handles it. Wonder why?
Preston Crawford
I bet it's pre-compiling the JSPs.
Mike Baranczak