java.lang.NullPointerException

Apereo Issues | Cyrus Rezvani | 6 years ago
  1. 0

    The exception is thrown (line 54) when the user-agent is null. Fix proposition : line 52 : +if (userAgent == null) { + return getDefaultThemeName(); +} Stack trace : 2011-02-24 14:19:54,687 ERROR [org.springframework.web.servlet.tags.ThemeTag] - null java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody0(ServiceThemeResolver.java:54) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody1$advice(ServiceThemeResolver.java:44) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName(ServiceThemeResolver.java:1) at org.springframework.web.servlet.support.RequestContextUtils.getTheme(RequestContextUtils.java:147) at org.springframework.web.servlet.support.RequestContext.getTheme(RequestContext.java:328) at org.springframework.web.servlet.tags.ThemeTag.getMessageSource(ThemeTag.java:50) at org.springframework.web.servlet.tags.MessageTag.resolveMessage(MessageTag.java:193) at org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:165) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79) at org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspx_meth_spring_005ftheme_005f0(errors_jsp.java:159) at org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspService(errors_jsp.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:421) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:662)

    Apereo Issues | 6 years ago | Cyrus Rezvani
    java.lang.NullPointerException
  2. 0

    The exception is thrown (line 54) when the user-agent is null. Fix proposition : line 52 : +if (userAgent == null) { + return getDefaultThemeName(); +} Stack trace : 2011-02-24 14:19:54,687 ERROR [org.springframework.web.servlet.tags.ThemeTag] - null java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody0(ServiceThemeResolver.java:54) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody1$advice(ServiceThemeResolver.java:44) at org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName(ServiceThemeResolver.java:1) at org.springframework.web.servlet.support.RequestContextUtils.getTheme(RequestContextUtils.java:147) at org.springframework.web.servlet.support.RequestContext.getTheme(RequestContext.java:328) at org.springframework.web.servlet.tags.ThemeTag.getMessageSource(ThemeTag.java:50) at org.springframework.web.servlet.tags.MessageTag.resolveMessage(MessageTag.java:193) at org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:165) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79) at org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspx_meth_spring_005ftheme_005f0(errors_jsp.java:159) at org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspService(errors_jsp.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:421) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:662)

    Apereo Issues | 6 years ago | Cyrus Rezvani
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Unbalanced parens cause NullPointerException

    GitHub | 4 years ago | yayitswei
    java.lang.NullPointerException
  5. 0

    NullPointerException in util/name-from-uri

    GitHub | 3 years ago | alexkalderimis
    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:1140)
    2. java.util.regex.Matcher.reset(Matcher.java:291)
    3. java.util.regex.Matcher.<init>(Matcher.java:211)
    4. java.util.regex.Pattern.matcher(Pattern.java:888)
    4 frames
  3. Jasig CAS Core
    ServiceThemeResolver.resolveThemeName
    1. org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody0(ServiceThemeResolver.java:54)
    2. org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName_aroundBody1$advice(ServiceThemeResolver.java:44)
    3. org.jasig.cas.services.web.ServiceThemeResolver.resolveThemeName(ServiceThemeResolver.java:1)
    3 frames
  4. Spring MVC
    RequestContextAwareTag.doStartTag
    1. org.springframework.web.servlet.support.RequestContextUtils.getTheme(RequestContextUtils.java:147)
    2. org.springframework.web.servlet.support.RequestContext.getTheme(RequestContext.java:328)
    3. org.springframework.web.servlet.tags.ThemeTag.getMessageSource(ThemeTag.java:50)
    4. org.springframework.web.servlet.tags.MessageTag.resolveMessage(MessageTag.java:193)
    5. org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:165)
    6. org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79)
    6 frames
  5. org.apache.jsp
    errors_jsp._jspService
    1. org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspx_meth_spring_005ftheme_005f0(errors_jsp.java:159)
    2. org.apache.jsp.WEB_002dINF.view.jsp.errors_jsp._jspService(errors_jsp.java:86)
    2 frames
  6. GWT dev
    HttpJspBase.service
    1. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    1 frame
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    1 frame
  8. GWT dev
    JspServlet.service
    1. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    2. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    3. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    3 frames
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    1 frame
  10. Glassfish Core
    StandardEngineValve.invoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    3. org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    4. org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)
    5. org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    6. org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    7. org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:421)
    8. org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
    9. org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
    10. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    11. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    12. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    12 frames
  11. org.apache.catalina
    ReplicationValve.invoke
    1. org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
    1 frame
  12. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    1 frame
  13. Embedded GlassFish Web
    ChannelSocket$SocketConnection.runIt
    1. org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    2. org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    3. org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
    4. org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    5. org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    5 frames
  14. Tomcat Util
    ThreadPool$ControlRunnable.run
    1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    1 frame
  15. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:662)
    1 frame