java.lang.NullPointerException

Apereo Issues | Andrea Chiodoni | 6 years ago
  1. 0

    For a prototype I'm developing I've set AnyHostnameVerifier to the Cas20ProxyReceivingTicketValidationFilter: <filter> <filter-name>CASValidationFilter</filter-name> <filter-class> org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter </filter-class> <init-param> .... </init-param> <init-param> <param-name>hostnameVerifier</param-name> <param-value>org.jasig.cas.client.ssl.AnyHostnameVerifier</param-value> </init-param> </filter> This lead to the following exception: Feb 11, 2011 8:59:51 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter CASValidationFilter java.lang.NullPointerException at org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:79) at org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:66) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.getHostnameVerifier(AbstractTicketValidationFilter.java:90) at org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.getTicketValidator(Cas20ProxyReceivingTicketValidationFilter.java:154) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.initInternal(AbstractTicketValidationFilter.java:102) at org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.initInternal(Cas20ProxyReceivingTicketValidationFilter.java:99) at org.jasig.cas.client.util.AbstractCasFilter.init(AbstractCasFilter.java:82) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4038) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4692) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:625) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:680) This is because in AbstractTicketValidationFilter.getHostnameVerifier does not check if config is null: if (className != null) { if (config != null) return ReflectUtils.newInstance(className, config); else return ReflectUtils.newInstance(className); } Or check if args is null on ReflectUtils, public static <T> T newInstance(final Class<T> clazz, final Object ... args)

    Apereo Issues | 6 years ago | Andrea Chiodoni
    java.lang.NullPointerException
  2. 0

    For a prototype I'm developing I've set AnyHostnameVerifier to the Cas20ProxyReceivingTicketValidationFilter: <filter> <filter-name>CASValidationFilter</filter-name> <filter-class> org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter </filter-class> <init-param> .... </init-param> <init-param> <param-name>hostnameVerifier</param-name> <param-value>org.jasig.cas.client.ssl.AnyHostnameVerifier</param-value> </init-param> </filter> This lead to the following exception: Feb 11, 2011 8:59:51 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter CASValidationFilter java.lang.NullPointerException at org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:79) at org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:66) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.getHostnameVerifier(AbstractTicketValidationFilter.java:90) at org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.getTicketValidator(Cas20ProxyReceivingTicketValidationFilter.java:154) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.initInternal(AbstractTicketValidationFilter.java:102) at org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.initInternal(Cas20ProxyReceivingTicketValidationFilter.java:99) at org.jasig.cas.client.util.AbstractCasFilter.init(AbstractCasFilter.java:82) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4038) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4692) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:625) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:680) This is because in AbstractTicketValidationFilter.getHostnameVerifier does not check if config is null: if (className != null) { if (config != null) return ReflectUtils.newInstance(className, config); else return ReflectUtils.newInstance(className); } Or check if args is null on ReflectUtils, public static <T> T newInstance(final Class<T> clazz, final Object ... args)

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

    Automated exception search integrated into your IDE

  4. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    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 org.jasig.cas.client.util.ReflectUtils.newInstance()
    2. Jasig CAS Client for Java - Core
      AbstractCasFilter.init
      1. org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:79)
      2. org.jasig.cas.client.util.ReflectUtils.newInstance(ReflectUtils.java:66)
      3. org.jasig.cas.client.validation.AbstractTicketValidationFilter.getHostnameVerifier(AbstractTicketValidationFilter.java:90)
      4. org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.getTicketValidator(Cas20ProxyReceivingTicketValidationFilter.java:154)
      5. org.jasig.cas.client.validation.AbstractTicketValidationFilter.initInternal(AbstractTicketValidationFilter.java:102)
      6. org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.initInternal(Cas20ProxyReceivingTicketValidationFilter.java:99)
      7. org.jasig.cas.client.util.AbstractCasFilter.init(AbstractCasFilter.java:82)
      7 frames
    3. Glassfish Core
      StandardContext.start
      1. org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
      2. org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
      3. org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
      4. org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4038)
      5. org.apache.catalina.core.StandardContext.start(StandardContext.java:4692)
      5 frames
    4. org.apache.catalina
      HTMLManagerServlet.doGet
      1. org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276)
      2. org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:625)
      3. org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136)
      3 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    6. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
      4. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      5. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      6. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      8. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
      9. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      10. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      11. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      12. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      12 frames
    7. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      3 frames
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:680)
      1 frame