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 2008/11/21 17:34:23 UTC

DO NOT REPLY [Bug 46261] New: Context with %2F in name causes tomcat crash on shutdown

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

           Summary: Context with %2F in name causes tomcat crash on shutdown
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: joe@k12s.phast.umass.edu


Context with %2F in name causes tomcat crash on shutdown

Several years ago I worked on integrating tomcat 5.5 into our web application
management infrastructure.  During the process I fixed several tomcat 5.5 bugs,
but apparently never sent the fixes upstream.  Oops.

Our application needs to be deployed to create a URL that looks like this:

/product/customername/servlet

I worked with several people on IRC to get tomcat5.5 to do this.  We had
previously been using the path= parameter in the context xml file element with
tomcat 4.1.  Unfortunately, it appears this feature was removed from tomcat5.5,
and tomcat5.5 does not recurse into subdirectories when reading .xml context
files.  The recommendation on IRC (after several suggestions which would not
work for our environment) was to put %2F in the context xml file's name.  Such
as this

product%2Fcustomername.xml

This does work, however when you try to shutdown tomcat 6.0.18, you will get
this crash:

Nov 9, 2008 10:56:17 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8180
Nov 9, 2008 10:56:18 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Nov 9, 2008 10:56:18 PM org.apache.catalina.startup.HostConfig undeployApps
WARNING: Error while removing context [/product%2Fcustomername]
java.lang.NullPointerException
        at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:915)
        at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1191)
        at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1162)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
        at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
        at
org.apache.catalina.core.StandardService.stop(StandardService.java:584)
        at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
        at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671)
Nov 9, 2008 10:56:18 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #4 from Mark Thomas <ma...@apache.org>  2008-12-26 15:51:04 PST ---
This has been fixed in trunk. I want to do some more testing of this and look
at bug 46262 before proposed anything for 6.0.x


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #2 from Joe Kislo <jo...@k12s.phast.umass.edu>  2008-11-21 08:36:13 PST ---
I have attached a patch that I have been using to work around this issue. It
modifies findChild to decode the name if the initial lookup fails.


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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


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

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




--- Comment #7 from Mark Thomas <ma...@apache.org>  2009-01-31 00:42:50 PST ---
This has been fixed in 6.0.x and will be included in 6.0.19 onwards.


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #3 from Mark Thomas <ma...@apache.org>  2008-11-21 08:45:56 PST ---
The correct way to do this in 6.0.18 is to use the # character rather than %2F.

%2F should be interpreted literally.


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #5 from Mark Thomas <ma...@apache.org>  2008-12-28 15:59:35 PST ---
*** Bug 46262 has been marked as a duplicate of this bug. ***


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #6 from Mark Thomas <ma...@apache.org>  2008-12-28 16:03:37 PST ---
I couldn't break my fix in my testing so I have proposed the fix for 6.0.x


-- 
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 46261] Context with %2F in name causes tomcat crash on shutdown

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





--- Comment #1 from Joe Kislo <jo...@k12s.phast.umass.edu>  2008-11-21 08:35:26 PST ---
Created an attachment (id=22910)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22910)
Proposed patch


-- 
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