java.lang.NullPointerException

ICEsoft JIRA Issue Tracker | Mandeep Hayher | 8 years ago
  1. 0

    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 ICE-2298 issue.

    ICEsoft JIRA Issue Tracker | 8 years ago | Mandeep Hayher
    java.lang.NullPointerException
  2. 0

    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)

    ICEsoft JIRA Issue Tracker | 9 years ago | Philip Breau
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    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 ICE-2298 issue.

    ICEsoft JIRA Issue Tracker | 8 years ago | Mandeep Hayher
    java.lang.NullPointerException
  5. 0

    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)

    ICEsoft JIRA Issue Tracker | 9 years ago | Philip Breau
    java.lang.NullPointerException

  1. tyson925 4 times, last 2 months ago
  2. tyson925 28 times, last 2 months ago
  3. lribeiro 6 times, last 3 months ago
  4. davidvanlaatum 1 times, last 4 months ago
  5. jk 2 times, last 5 months ago
5 more registered users
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.util.regex.Matcher.getTextLength()
  2. Java RT
    Pattern.matcher
    1. java.util.regex.Matcher.getTextLength(Matcher.java:1127)
    2. java.util.regex.Matcher.reset(Matcher.java:284)
    3. java.util.regex.Matcher.<init>(Matcher.java:205)
    4. java.util.regex.Pattern.matcher(Pattern.java:879)
    4 frames
  3. com.icesoft.faces
    MainServlet.service
    1. com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:156)
    2. com.icesoft.faces.webapp.http.common.ResponseProxy.setHeader(ResponseProxy.java:20)
    3. com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:33)
    4. com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:45)
    5. com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147)
    6. com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:42)
    7. com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
    8. com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
    9. com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
    10. com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:26)
    11. com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
    12. com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
    13. com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
    14. com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
    15. com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
    15 frames
  4. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    1 frame
  5. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    8 frames
  6. Grizzly HTTP
    LeaderFollowerWorkerThread.runIt
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    4 frames
  7. Tomcat Util
    ThreadPool$ControlRunnable.run
    1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    1 frame
  8. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:595)
    1 frame