Bug 49566 - NullpointerException if <TOMCAT_HOME>/webapps/ROOT is deleted or removed
Summary: NullpointerException if <TOMCAT_HOME>/webapps/ROOT is deleted or removed
Status: RESOLVED DUPLICATE of bug 49536
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.0
Hardware: PC Windows XP
: P2 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2010-07-07 04:48 UTC by lff0305
Modified: 2010-07-07 05:26 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description lff0305 2010-07-07 04:48:37 UTC
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
	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.
Comment 1 Mark Thomas 2010-07-07 05:26:07 UTC

*** This bug has been marked as a duplicate of bug 49536 ***