Details
Description
Our Jetty based website has numerous non-context servlets invoked by org.mortbay.jetty.servlet.Invoker (nonContextServlets = true).
The website can run without any problems for 1 hour to many days.
But suddenly we experience HTTP ERROR 500 on one or more web-page as the stack-trace below shows.
I have looked at the Jetty 6.1.26 and may have found an issue in ServletHolder.hasCode:
return _name == null ? System.identityHashCode(this) : _name.hashCode();
If _name is null System.identityHashCode(this) is used.
What will happen if System.identityHashCode(this) doesn't return the same value over time?
Could that cause this error?
HTTP ERROR 500
Problem accessing /servlet/com.yorkref.servlets.LoginStatisticServlet. Reason:
No such servlet: com.yorkref.servlets.homeservlet-7560790
Caused by:
java.lang.IllegalStateException: No such servlet: com.yorkref.servlets.homeservlet-7560790
at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1077)
at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1163)
at org.mortbay.jetty.servlet.ServletHandler.addServletWithMapping(ServletHandler.java:821)
at org.mortbay.jetty.servlet.ServletHandler.addServletWithMapping(ServletHandler.java:782)
at org.mortbay.jetty.servlet.Invoker.service(Invoker.java:175)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)