You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/04/02 16:28:13 UTC

DO NOT REPLY [Bug 53024] New: Accessing Servlet while Reloading context gives 404 error

https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

             Bug #: 53024
           Summary: Accessing Servlet while Reloading context gives 404
                    error
           Product: Tomcat 7
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: yoursoft@freemail.hu
    Classification: Unclassified


I think the following Tomcat 6 bug is reoccuring in Tomcat 7.0.26:
https://issues.apache.org/bugzilla/show_bug.cgi?id=43683

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #4 from Karl Penney <ka...@eastlink.ca> 2012-04-07 00:59:09 UTC ---
The problem seems to be that the wrappers (servlets) are unregistered from the
context as part of the stop process. If a request comes in before the context
is started again, then no wrapper gets mapped to the request and
StandardContextValve returns SC_NOT_FOUND.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #2 from Ferenc Lutischan <yo...@freemail.hu> 2012-04-04 11:30:55 UTC ---
Created attachment 28542
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28542
Test application

Test application

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> 2012-04-03 20:24:28 UTC ---
Do you have any evidence to support a regression claim? Test case?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #6 from Karl Penney <ka...@eastlink.ca> 2012-04-09 18:07:46 UTC ---
It shouldn't reject requests while the context is being reloaded. The
StandardContextValve waits for the reload to complete, but by that point it can
be too late since the request wrapper might not have gotten set. Maybe Tomcat
should not unregister the wrappers when a context is reloaded?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


[Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #8 from Mark Thomas <ma...@apache.org> ---
I can recreate this with the provided test case. The 404 response is not the
expected behaviour. Tomcat should pause the request until the application
finishes reloading and then server.

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

[Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Mark Thomas <ma...@apache.org> ---
Thanks for the test case. This has been fixed in trunk and 7.0.x and will be
included in 7.0.28 onwards.

I also took the opportunity to improve the handling when a watched resource
(such as web.xml) changes. This is now handled with a reload (so no 404s)
rather than stop followed by a start.

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

DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #3 from Ferenc Lutischan <yo...@freemail.hu> 2012-04-04 11:40:27 UTC ---
Test case:

- Unzip the downloaded Tomcat 7.0.26 from tomcat.apache.org site
- Edit the unzipped dir/conf/tomcat-users.xml. Add the following line:
  <user password="ide" roles="standard,manager-gui,admin" username="ide"/>
- Unzip the attached "Test application" into the unzipped dir/webapps
- start tomcat
- open http://localhost:8080/ServletRestartTest/ServletRestartTest
- open the manager application (http://localhost:8080/manager/html) with
ide/ide
- reload the ServletRestartTest application from manager application
- while it reloading try to reload the
http://localhost:8080/ServletRestartTest/ServletRestartTest url.
- You will get a 404 error page

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #7 from Ferenc Lutischan <yo...@freemail.hu> 2012-04-10 18:12:03 UTC ---
> This isn't a bug: it's how Tomcat works. Why would your undeployed context
> still be able to successfully serve requests?

Tomcat 6 doesn't send 404 when context is reloading.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 53024] Accessing Servlet while Reloading context gives 404 error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> 2012-04-09 16:28:16 UTC ---
(In reply to comment #4)
> The problem seems to be that the wrappers (servlets) are unregistered from the
> context as part of the stop process. If a request comes in before the context
> is started again, then no wrapper gets mapped to the request and
> StandardContextValve returns SC_NOT_FOUND.

This isn't a bug: it's how Tomcat works. Why would your undeployed context
still be able to successfully serve requests?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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