Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366316

Summary: Superfluous printStackTrace on 404, introduced in 365370 (RC1)
Product: [RT] Jetty Reporter: David Kellum <dek94>
Component: serverAssignee: Jan Bartel <janb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: janb, jetty-inbox
Version: unspecified   
Target Milestone: 7.5.x   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Kellum CLA 2011-12-10 16:49:54 EST
Build Identifier: 7.6.0.RC1, 8.1.0.RC1

This commit:

050afb8d57ee38d2c384a81f821677d76d340fe3 365370 ServletHandler can fall through to nested handler

Added 

jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java:1233:

+        new Throwable().printStackTrace();

Which results in the expected print out:

java.lang.Throwable
	at org.eclipse.jetty.servlet.ServletHandler.notFound(ServletHandler.java:1233)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:461)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1028)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:962)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:349)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:430)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:891)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:68)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:722)

In the simple case of a 404 when there is no context for a path.

Might this have been an unintended check in of debug code?  The debug level logging following this, seems to adequately cover the case.
 



Reproducible: Always
Comment 1 Jan Bartel CLA 2011-12-11 20:18:13 EST
Yep, looks like that should be removed. Done.