Details
Description
When using a welcome-page forwarding from the context-root, eg.
URL: http://localhost:8080/WebApp/
web.xml:
<welcome-file-list>
<welcome-file>main.jspx</welcome-file>
</welcome-file-list>
You'll run into an NPE when FileServer.service() tries to parse the context-root:
String mimeType = mimeTypeMatcher.mimeTypeFor(path);
If path is "/" the mimetype will be null.
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
at java.util.regex.Matcher.reset(Matcher.java:284)
at java.util.regex.Matcher.<init>(Matcher.java:205)
at java.util.regex.Pattern.matcher(Pattern.java:879)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:156)
at com.icesoft.faces.webapp.http.common.ResponseProxy.setHeader(ResponseProxy.java:20)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:33)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:45)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:42)
at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:26)
at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
This CLONE pertains to the originalICE-2298 issue.
URL: http://localhost:8080/WebApp/
web.xml:
<welcome-file-list>
<welcome-file>main.jspx</welcome-file>
</welcome-file-list>
You'll run into an NPE when FileServer.service() tries to parse the context-root:
String mimeType = mimeTypeMatcher.mimeTypeFor(path);
If path is "/" the mimetype will be null.
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
at java.util.regex.Matcher.reset(Matcher.java:284)
at java.util.regex.Matcher.<init>(Matcher.java:205)
at java.util.regex.Pattern.matcher(Pattern.java:879)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:156)
at com.icesoft.faces.webapp.http.common.ResponseProxy.setHeader(ResponseProxy.java:20)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:33)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:45)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:42)
at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:26)
at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
This CLONE pertains to the original
Activity
Philip Breau
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Fix Version/s | 1.7DR#3 [ 10112 ] | |
Fix Version/s | 1.7 [ 10080 ] | |
Affects Version/s | 1.7.1 [ 10122 ] | |
Affects Version/s | 1.7DR#2 [ 10110 ] | |
Reporter | Philip Breau [ philip.breau ] | Mandeep Hayher [ mandeep.hayher ] |
Assignee | Mircea Toma [ mircea.toma ] |
Ken Fyten
made changes -
Description |
When using a welcome-page forwarding from the context-root, eg. URL: http://localhost:8080/WebApp/ web.xml: <welcome-file-list> <welcome-file>main.jspx</welcome-file> </welcome-file-list> You'll run into an NPE when FileServer.service() tries to parse the context-root: String mimeType = mimeTypeMatcher.mimeTypeFor(path); If path is "/" the mimetype will be null. SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1127) at java.util.regex.Matcher.reset(Matcher.java:284) at java.util.regex.Matcher.<init>(Matcher.java:205) at java.util.regex.Pattern.matcher(Pattern.java:879) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:156) at com.icesoft.faces.webapp.http.common.ResponseProxy.setHeader(ResponseProxy.java:20) at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:33) at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:45) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147) at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:42) at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:26) at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30) at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16) at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) |
When using a welcome-page forwarding from the context-root, eg. URL: http://localhost:8080/WebApp/ web.xml: <welcome-file-list> <welcome-file>main.jspx</welcome-file> </welcome-file-list> You'll run into an NPE when FileServer.service() tries to parse the context-root: String mimeType = mimeTypeMatcher.mimeTypeFor(path); If path is "/" the mimetype will be null. SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1127) at java.util.regex.Matcher.reset(Matcher.java:284) at java.util.regex.Matcher.<init>(Matcher.java:205) at java.util.regex.Pattern.matcher(Pattern.java:879) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:156) at com.icesoft.faces.webapp.http.common.ResponseProxy.setHeader(ResponseProxy.java:20) at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:33) at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:45) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147) at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:42) at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:26) at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30) at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16) at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) This CLONE pertains to the original |
Ken Fyten
made changes -
Fix Version/s | 1.8DR#3 [ 10143 ] | |
Fix Version/s | 1.8DR#2 [ 10142 ] |
Ken Fyten
made changes -
Link | This issue is duplicated by ICE-3786 [ ICE-3786 ] |
Ken Fyten
made changes -
Summary | CLONE -NPE when forwarding from web.xml welcome-page | NPE when forwarding from web.xml welcome-page |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17937 | Wed Nov 26 14:22:08 MST 2008 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainServlet.java
|
Mircea Toma
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Mircea Toma
made changes -
Salesforce Case | [] | |
Affects | [Documentation (User Guide, Ref. Guide, etc.)] |
Ken Fyten
made changes -
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Fix Version/s | 1.8DR#3 [ 10143 ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Mircea Toma [ mircea.toma ] |
This issue is failing the regression test for 1.7.2, and 1.7.1.
message seen on server console.
Sep 26, 2008 10:38:03 AM com.icesoft.faces.webapp.http.common.standard.Compressi
ngServer$CompressingRequest$1 respond
WARNING: Connection aborted
java.io.FileNotFoundException: C:\MyDownloads\apache-tomcat-5.5.23\temp\0-ICE-22
98 (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.ja
va:35)