tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dustin <bronco_fan_...@yahoo.com>
Subject Re: Deployment problem
Date Fri, 03 Dec 2004 02:30:38 GMT
First, QM, about the work/ dir, too late. Already
doing it. Doesn't seem to be causing any problems.
Thanks for the warning tho...

Second, I figured out what I was doing wrong in the
tomcat 5 workaround I was experimenting with. If I
would have just read the stupid logs after the tomcat
restart, I would have noticed the error was:

java.lang.IllegalArgumentException: Document base
/srv/stuff does not exist or is not a readable
directory

So i just changed the docBase attribute in the Context
element to simply "stuff" instead of "/srv/stuff". The
application reloads with tomcat nicely.

This still seems like a hack to me, always having to
use the html manager interface. So if anyone knows of
a better way, I would love to hear it.

Thanks,
  Dustin


--- Dustin <bronco_fan_no1@yahoo.com> wrote:

> In tomcat 4, I first created the following folder:
> 
>
$CATALINA_HOME/work/Standalone/${hostname}/manager/srv
> 
> This folder is where the war and context file for
> the
> application will be placed when deploying via ant or
> maven using the manager.
> 
> Now, in the application's context.xml file, I set
> the
> path to '/srv/stuff' and the docBase to the same.
> 
> Once deployed, the war and context files will be
> named
> stuff.war and stuff.xml in the above directory.
> 
> Tomcat 5 works a bit differently. When the app is
> deployed with the srv prefix, the war and context
> file
> are renamed to srv#stuff.war and srv#stuff.xml after
> deployment via maven (haven't tested ant yet, but
> we're trying to phase it out as a deployment tool
> anyway). Here is the problem:
> 
> 2004-11-22 09:47:38
> StandardContext[/manager]Manager:
> install: Installing context configuration at
>
'file:$CATALINA_HOME/conf/Catalina/${hostname}/srv#stuff.xml'
> from
> 'jar:file:$CATALINA_HOME/webapps/srv#stuff.war!/'
> 2004-11-22 09:47:38
> StandardContext[/manager]Manager:
>
ManagerServlet.configure[file:$CATALINA_HOME/conf/Catalina/${hostname}/srv#stuff.xml]
> java.net.MalformedURLException: no !/ in spec
>         at java.net.URL.<init>(URL.java:571)
>         at java.net.URL.<init>(URL.java:434)
>         at java.net.URL.<init>(URL.java:383)
> ...
> 
> I am assuming the problem is the # in the filename,
> but I'm not sure.
> 
> I thought I found a workaround the other day. If I
> just had maven build the war and then use the
> manager
> html interface to deploy the war, it worked fine.
> The
> files were in their place as stuff.xml and
> stuff.war.
> 
> But once I restarted tomcat, the manager list showed
> 2
> apps deployed; /stuff and /srv/stuff, neither of
> which
> worked.
> 
> I've tried several other configurations all with
> varying levels of failure.
> 
> Any ideas?
> 
> Dustin
> 
> 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message