-
1. Re: deploy unpacked wars in external directory
jaikiran Oct 28, 2009 1:41 AM (in response to thomasgo)Sorry, but i did not understand the details you posted. But looking at your subject line, i guess you want this http://www.jboss.org/community/wiki/HowtodeploymyapplicationinanexternaldirectoryinJBoss-5. I am assuming you are using JBoss AS5. If not, post the exact version of the server.
-
2. Re: deploy unpacked wars in external directory
thomasgo Oct 28, 2009 3:26 AM (in response to thomasgo)A sorry, no I'm currently using JBoss 4.2.3.GA.
The problem is that I told JBoss where to look for applications and it finds the war folders (unpacked applications) in the external directory. But on startup it seems to have difficulties to read the folder. It looks like JBoss is assuming that the application is packed in an archive (at least that's what I think the line "java.util.zip.ZipFile.open(Native Method)" wants to tell me). -
3. Re: deploy unpacked wars in external directory
thomasgo Oct 28, 2009 1:27 PM (in response to thomasgo)No luck yet.
I tried deploying an exploded ear containing an exploded war in an external directory, and it works like a charm.
But when I deploy the exploded war directly it doesn't work. Very strange. -
4. Re: deploy unpacked wars in external directory
thomasgo Oct 29, 2009 6:50 AM (in response to thomasgo)Finally, I have found the error.
I haddeploy/,file://C:/<project dir>/src/main/webapp/
which worked with an unpacked EAR lying in the folder (e.g. C:/<project dir>/src/main/webapp/myapp.ear) but not with an unpacked war.
Changing this todeploy/,file:///C:/<project dir>/src/main/webapp/
(one more slash after file:) enabled JBoss to read the directory it found. This now works.
What I still don't understand:
Reflecting on the change I remembered that a preceding slash marks the path as absolute. If the slash is missing the path is relative to the server, hence 'deploy/' and not '/deploy/'.
Stripping the protocol from my path results in C:/<project dir>/src/main/webapp/ which would mean the path should be relative to the server. It thus makes sense that JBoss couldn't read myapp.war inside that path, since a path /C://.../myapp.war doesn't exist.
What is strange though, is that JBoss found myapp.war inside that (non-existing) path and had no problems loading myapp if it was an ear (i.e. myapp.ear).