tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 43683] Accessing Servlet while Reloading context gives 404 error
Date Wed, 25 Jun 2008 15:32:25 GMT

--- Comment #18 from Joe Kislo <>  2008-06-25 08:32:23 PST ---
Well that's frustrating :)  I've done some work on it today to try to narrow
down when it happens.

I've written a java program that will make the required calls to the URLs in
parallel to cause the issue.  I wrapped it in a loop, and it happened the first
time I ran it!  Then I ran it again, and let it run for 2 hours without it
happening once.

Then I restarted tomcat, and it happened first time!

So it seems to happen a lot *more* when tomcat has first started... but still
not every time.  I'm using Sun's 1.5.0_15 jvm if that somehow makes a

So I am attaching a unix shell script that will start+stop tomcat between each
test run, and my java program that does the URL calling.  You may need to tweak
a couple variables to make this work on your machine: 
  TOMCAT_BIN_DIR - Set this to where the script is
  TESTCASE3_URL - Put the url to testcase3 (the one that spins cpu during init)
  RESTART_TOMCAT_URL - Put the url to restart that servlet
  RESTART_TOMCAT_BASIC_AUTH - Put in the basic authentication credentials for
the manager servlet in format username:password

With those changes... I think that will get it going for you.  The theory here
while (true) {
 start tomcat
 Request the servlet
 Restart the servlet
 Request the servlet
 stop tomcat

When the testcase fails you'll see something like this:

Using CATALINA_BASE:   /var/tmp/tomcat/apache-tomcat-6.0.16
Using CATALINA_HOME:   /var/tmp/tomcat/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: /var/tmp/tomcat/apache-tomcat-6.0.16/temp
Using JRE_HOME:       /usr/local/java
Sleeping for tomcat to start
Testcase Call 1: Requesting URL
Restart call: Requesting URL
Testcase Call 2: Requesting URL
Testcase Call 1: IOException in URL request Server returned HTTP response code: 500 for URL:
Using CATALINA_BASE:   /var/tmp/tomcat/apache-tomcat-6.0.16
Using CATALINA_HOME:   /var/tmp/tomcat/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: /var/tmp/tomcat/apache-tomcat-6.0.16/temp
Using JRE_HOME:       /usr/local/java
Sleeping for tomcat to stop

In the cases where it tomcat succeeds, I see this on the server side:
INFO: Waiting for 1 instance(s) to be deallocated

I do not see that when my testcase fails.

FWIW, I am using a apache-tomcat-6.0.16 binary installation, and I dropped in
lib/* and bin/*.jar from a newly compiled trunk svn checkout from yesterday

Good luck!

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message