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

           Summary: NullpointerException if <TOMCAT_HOME>/webapps/ROOT is
                    deleted or removed
           Product: Tomcat 7
           Version: 7.0.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: lff0...@gmail.com


I reproduce this issue by Google Chrome, not IE.

I created a test servlet (named testServlet) and put it under
TOMCAT_HOME/webapps/test/testServlet, and this servlet can be executed as
expected.

But the following exception is got:

An exception or error occurred in the container during the request processing
java.lang.NullPointerException
    at
org.apache.catalina.connector.Request.getServletContext(Request.java:1541)
    at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:636)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:398)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:249)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
    at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

>From wiredshark I saw 2 requests. 
The first request is to my servlet under /test/testServlet which is OK;
The second is request to /favicon.ico

But I have REMOVED TOMCAT_HOME/webapps/ROOT so this favicon.ico can not be got.
But a NPE is not good, I think.

After I create a folder named ROOT under webapps and put a favicon.ico under
it, this NPE disappears.

-- 
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to