Re: Fwd: catalina ant deploy task problem...
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Ok, well I figured it out.
I should have tested with another version of Tomcat. It seems that they
modified the web.xml for the manager context. Instead of configuring the
Manager servlet with a servlet-mapping of "/*", they explicitly defined
each possible mapping. However, they forgot to include "/deploy". I added
that to the mapping and the security constraint web-resource-collection and
everything works fine now. Man, that is two weekends where I've spent a
*ton* of time trying to figure out what seems like a simple issue and each
time it turned out to be a bug I was beating my head against! Ugh!!!! I
reported the bug in Apache's Bugzilla system.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16243
Later today I will check in changes to allow for a working
catalina-deploy. This includes building a .war file in WEB-INF/tmp$ and
filter copying sample.ccf.xml to WEB-INF/tmp$/META-INF/context.xml.
The process can be reviewed by others and we can make changes as to what
gets included in the .war file and where it gets built. all are easily
modifiable.
BTW, I'm also modifying properties files to be loaded in the following order...
<property file="${user.home}/${ant.project.name}-build.properties"/>
<property file="${user.home}/build.properties"/>
<property environment="env"/>
<property file="version.properties"/>
<property file="build.properties"/>
<property file="sample.build.properties"/>
This will make user-specified overrides both common and Barracuda project
specific properties simple. Specifically, the reason I am doing this now
is so that we don't have to put a valid manager.username and
manager.password in build.properties. They can be overridden by each user,
thus, avoiding advertising some ones private information and make the
Barracuda build capable of user-defined defaults for compilation and
whatever else.
Jake
At 11:10 AM 1/19/2003 +0100, you wrote:
>Hi Jake,
>
>I'm using the deploy task with the same attributes and it works.
>Thinking of the IO exception you might take a look at the following
>areas:
>
>1) the URL. Speaking of unix, there we have
>file:///home/stefan/whatever.war
>The first two "//" belong to the protocol specification, the last one to
>the path in the filesystem. So when using a Micro$oft OS, an absolute
>path starts with the drive letter. Following this, your URL should be
>file://C:/anypath/anyfile.war (you are using three "///"). Im not sure
>if you have to use "\" instead of "/" in the path.
>
>2) Did you check check your file access permissions? AFAIK tomcat
>receives the war file using a HTTP PUT and places it somewhere in the
>work subdirectory. Do you see your war file here?
>
>3) Try to increase the debug attribute of the manager context in
>server.xml, to get more logging info. Hopefully you get a hint in the
>logs what's going wrong.
>
>4) Does your server.xml have unpackWARs="true" autoDeploy="true" set in
>the Host element?
>
>Another short note for the deploy task specific to barracuda:
>Tomcat processes META-INF/context.xml as a context configuration into
>server.xml. So I think we should move WEB-INF/ccf.xml to
>META-INF/context.xml.
>
>Regards,
>Stefan
>
>Am Son, 2003-01-19 um 01.28 schrieb Jacob Kjome:
> > Hi Everyone,
> >
> > I posted this to the Tomcat list and got zero response. Anyone have
> > an answer for this one? I'm trying to enabled the catalina-deploy
> > task for Barracuda. I made a new target to build the .war file and I
> > changed the existing catalina-deploy to look like this...
> >
> > <catalina-deploy
> > url="${manager.url}"
> > username="${manager.username}"
> > password="${manager.password}"
> > path="${app.path}"
> > war="${app.war}" />
> >
> > catalina-install works just fine as do all of the other Ant Catalina
> > tasks. It is just catalina-deploy that is failing. Has anyone gotten
> > this to work? I'm using Tomcat-4.1.19.
> >
> > Jake
> >
> >
> > > Date: Sat, 18 Jan 2003 03:27:59 -0600
> > > To: "Tomcat Users List" <[email protected]>
> > > From: Jacob Kjome <[email protected]>
> > > Subject: catalina ant deploy task problem...
> > >
> > >
> > > I have always used the "install" task, so I haven't run into this
> > > issue until now. I have a .war file which I want to deploy to
> > > Tomcat. The path is correct because I've tried the same file:///
> > > URL to do an "install" from the manager web GUI and that was
> > > successful. I also use the same path, username, and password as the
> > > install task. However, I am getting the following error:
> > >
> > > catalina-deploy:
> > > [echo]
> > >
> file:///D:/myclasses/Repository/Enhydra/BarracudaMVC_2003-01-15/Barracuda/Barracuda.war
> > >
> > > BUILD FAILED
> > > file:./catalina-tasks.incl:50: java.io.IOException: Server returned
> > > HTTP respons
> > > e code: 403 for URL:
> > > http://localhost:8080/manager/deploy?path=%2FBarracuda
> > >
> > > Anyone know why this might be? I am logged in as administrator so
> > > it shouldn't be a file/directory permissions problem. What the
> > > heck?
> > >
> > > Jake
>
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda