tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37271] New: - Deployer.install()/JMX bug results in HTTP 302 redirect responses
Date Thu, 27 Oct 2005 14:28:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37271>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37271

           Summary: Deployer.install()/JMX bug results in HTTP 302 redirect
                    responses
           Product: Tomcat 5
           Version: 5.0.28
          Platform: HP
        OS/Version: HP-UX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: Ian.Bray@logicacmg.com


When Tomcat is started using org.apache.catalina.startup.Embedded and 
deployer.install() is called several (eg 5) times in quick succession the 
servlet contexts may be incompletely deployed.

Given this problem, after deployment when in use requests to a URL 
(eg. /localhost/eaifclient) are being rejected with a 302 response indicating 
a redirect to the same URL but with "/" appended (eg./localhost/eaifclient/) 
This appears to be random. The same request can be repeated and will 
sporadically pass or fail each time the application using embedded Tomcat is 
re-started.

Analysis shows that after deployment, in the cases where incoming HTTP 
requests succeeded Mapper::internalMapWrapper() was able to find a wild card 
mapping in rule 2 (prefix match) for the context "eaifclient".  When the 
request fails, rule 2 does not find the wildcard mapping and sets the redirect 
path because the context.wildcardWrappers array is empty.

The web.xml for each of the servlets contain mappings similar to the following:
  <servlet-mapping>
    <servlet-name>eaifclient</servlet-name>
    <url-pattern>*</url-pattern>
  </servlet-mapping>

There appears to be a race condition within the JMX deployment of the contexts.

Analysis of this theory revealed that in the cases where incoming HTTP 
requests failed, there are fewer the JMX triggered calls during deployment to 
the addWrapper()  methods compared with the number of calls in successful 
cases.  addWrapper(Context context, String path, Object wrapper, boolean 
jspWildCard) soes not called to set a wrapper ending with "/*" for the servlet 
context of the requests that fail.

The problems do not occur if the contexts are deployed using 
embedded.createContext() before Tomcat is started.

The java version on HPUX is 1.4.2.08-050401-17:46.  The problem also occurs 
very occasionally on Windows XP running java 1.4.2_08.

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

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


Mime
View raw message