After adding a context xml file, web-app doesn't always start

2005-10-11 Thread David Farrell
Hi all,

For a while my web app was connecting manually to the db but obviously
that's a bit rubbish so I looked at some examples and moved the db stuff
into the context file for my app.  I have never written a context file and
I think I may have missed something.

Now when I use ant to install my app, it sometimes fails - ant says
successful build but tomcat throw an exeption that my app conspiracy
cannot be found under /webapps/conspiracy  - it isn't being installed from
that location - ant installs it from my build dir outside of the tomcat
folder entirely.

If this was happening all the time, it would be more understandable but
roughly 50% of the time (and every time i re-type ant remove install
immediately after a fail) it installs fine.

I imagine that I need to do something to my context xml file?  I'm not
really sure but the only change in the app pre and post this error is
moving the db stuff to the xml file.

The xml file is attached:?xml version='1.0' encoding='utf-8'?
Context crossContext=true debug=5 docBase=conspiracy path=/conspiracy reloadable=true
Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_conspiracy_log. suffix=.txt timestamp=true/
Resource name=jdbc/conspiracy_db type=javax.sql.DataSource/
ResourceParams name=jdbc/conspiracy_db
parameter
nameurl/name
valuejdbc:mysql://localhost:3306/conspiracy_db?autoReconnect=true/value
/parameter
parameter
namevalidationQuery/name
valueselect now()/value
/parameter
parameter
namemaxIdle/name
value30/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
nameusername/name
valueroot/value
/parameter
parameter
namepassword/name
valuepassword/value
/parameter

parameter
	nameremoveAbandoned/name
	valuetrue/value
/parameter
parameter
	nameremoveAbandonedTimeout/name
	value60/value
/parameter
parameter
	namelogAbandoned/name
	valuetrue/value
/parameter
/ResourceParams
/Context
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: After adding a context xml file, web-app doesn't always start

2005-10-11 Thread Caldarale, Charles R
 From: David Farrell [mailto:[EMAIL PROTECTED] 
 Subject: After adding a context xml file, web-app doesn't always start
 
 I think I may have missed something.

Such as telling us which version of Tomcat you're using.

 tomcat throw an exeption that my app conspiracy
 cannot be found under /webapps/conspiracy

Your docBase attribute says webapps/conspiracy is the location of the
app.

 I imagine that I need to do something to my context xml file?  I'm not
 really sure but the only change in the app pre and post this error is
 moving the db stuff to the xml file.

Where is your context xml file?  What is it's actual name?  (The
attached file is named context_home.xml, which can't be really be what
you're using.)  Read up on the attribute fields of the Context element
for the version of Tomcat you're using.  In particular, if you're using
5.5.x, don't put Context in server.xml, and don't use the path
attribute.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]