java.lang.NullPointerException

Apereo Issues | Robert Winch | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    It appears a non passive change was introduced in the client which requires the SingleSignOutFilter to have its init method invoked. This is not ideal when using a DI such as Spring and Spring Security since the init method is not participating in the lifecycle. In short, with 3.2.x the SingleSignOutFilter can be configured with the instructions found in the [Spring Security reference|http://docs.spring.io/spring-security/site/docs/3.2.x/reference/htmlsingle/#cas-singlelogout]. Updating to CAS 3.3.x produces the following error: {code} java.lang.NullPointerException at org.jasig.cas.client.util.CommonUtils.safeGetParameter(CommonUtils.java:330) at org.jasig.cas.client.session.SingleSignOutHandler.isTokenRequest(SingleSignOutHandler.java:114) at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:66) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) 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:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440) 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.content(HttpConnection.java:943) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code} This is due to the changes made in commit [a947490c0|https://github.com/Jasig/java-cas-client/commit/a947490c0411c463c1a5ee94a6ce72855a0d995b#diff-16e810a659623954cead35c3b19f043dR37] which assumes that the init method will be invoked. *NOTE*: This blocks [SEC-2547|https://jira.spring.io/browse/SEC-2547]

    Apereo Issues | 3 years ago | Robert Winch
    java.lang.NullPointerException
  2. 0

    It appears a non passive change was introduced in the client which requires the SingleSignOutFilter to have its init method invoked. This is not ideal when using a DI such as Spring and Spring Security since the init method is not participating in the lifecycle. In short, with 3.2.x the SingleSignOutFilter can be configured with the instructions found in the [Spring Security reference|http://docs.spring.io/spring-security/site/docs/3.2.x/reference/htmlsingle/#cas-singlelogout]. Updating to CAS 3.3.x produces the following error: {code} java.lang.NullPointerException at org.jasig.cas.client.util.CommonUtils.safeGetParameter(CommonUtils.java:330) at org.jasig.cas.client.session.SingleSignOutHandler.isTokenRequest(SingleSignOutHandler.java:114) at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:66) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) 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:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440) 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.content(HttpConnection.java:943) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code} This is due to the changes made in commit [a947490c0|https://github.com/Jasig/java-cas-client/commit/a947490c0411c463c1a5ee94a6ce72855a0d995b#diff-16e810a659623954cead35c3b19f043dR37] which assumes that the init method will be invoked. *NOTE*: This blocks [SEC-2547|https://jira.spring.io/browse/SEC-2547]

    Apereo Issues | 3 years ago | Robert Winch
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.jasig.cas.client.util.CommonUtils.safeGetParameter()
    2. Jasig CAS Client for Java - Core
      SingleSignOutFilter.doFilter
      1. org.jasig.cas.client.util.CommonUtils.safeGetParameter(CommonUtils.java:330)
      2. org.jasig.cas.client.session.SingleSignOutHandler.isTokenRequest(SingleSignOutHandler.java:114)
      3. org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:66)
      3 frames
    3. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      2. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      4. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      5. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      6. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      7. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      8. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      9. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      9 frames
    4. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    5. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      1 frame
    6. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    7. Jetty Server
      SslSocketConnector$SslConnection.run
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
      7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      8. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      9. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      10. org.mortbay.jetty.Server.handle(Server.java:326)
      11. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      12. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
      13. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      14. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      15. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      16. org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      17. org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680)
      17 frames
    8. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame