Announcement Announcement Module
Collapse
No announcement yet.
NullPointerException while authentication at RandomValueOAuth2ProviderTokenServices Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NullPointerException while authentication at RandomValueOAuth2ProviderTokenServices

    Hi,

    I am using spring-security-oauth2 version 1.0.0.M4. WE used to make successful oauth with this. But now in production we are getting NullpointerException after few months of running it ..

    Code:
    [gogii] DEBUG [http-43080-25] PersistedProviderTokenServices.readAuthentication(37) | Reading token for: 50dec17f-21e6-47a7-b0f0-91697fbe68c0
    2012-05-29_17:53:27.69022 [gogii] DEBUG [http-43080-25] PersistedProviderTokenServices.removeAccessTokenUsingRefreshToken(101) | removeAccessTokenUsingRefreshToken: 9805396e-4ecd-40f7-b530-205355495e09
    2012-05-29_17:53:27.69166 [gogii] DEBUG [http-43080-25] PersistedProviderTokenServices.readRefreshToken(85) | readRefreshToken: 9805396e-4ecd-40f7-b530-205355495e09
    2012-05-29_17:53:27.69319 [gogii] DEBUG [http-43080-25] PersistedProviderTokenServices.readAuthentication(67) | read authentication for: 9805396e-4ecd-40f7-b530-205355495e09
    2012-05-29_17:53:27.69521 May 29, 2012 1:53:27 PM org.apache.catalina.core.StandardWrapperValve invoke
    2012-05-29_17:53:27.69523 SEVERE: Servlet.service() for servlet spring threw exception
    2012-05-29_17:53:27.69523 java.lang.NullPointerException
    2012-05-29_17:53:27.69524 	at org.springframework.security.oauth2.provider.token.RandomValueOAuth2ProviderTokenServices.createAccessToken(RandomValueOAuth2ProviderTokenServices.java:230)
    2012-05-29_17:53:27.69525 	at org.springframework.security.oauth2.provider.token.RandomValueOAuth2ProviderTokenServices.refreshAccessToken(RandomValueOAuth2ProviderTokenServices.java:167)
    2012-05-29_17:53:27.69525 	at org.springframework.security.oauth2.provider.filter.OAuth2AuthorizationSuccessHandler.onAuthenticationSuccess(OAuth2AuthorizationSuccessHandler.java:43)
    2012-05-29_17:53:27.69526 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.successfulAuthentication(AbstractAuthenticationProcessingFilter.java:323)
    2012-05-29_17:53:27.69527 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.successfulAuthentication(AbstractAuthenticationProcessingFilter.java:288)
    2012-05-29_17:53:27.69527 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:213)
    2012-05-29_17:53:27.69528 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
    2012-05-29_17:53:27.69529 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
    PersistedProviderTokenServices is a memcache call we use to persist token.
    Oauth call is
    Code:
    http://localhost:8080/oauth/token?dev=iPhone%20Simulator&pmsg=0&checkVersion=1&memberId=xxxx&grant_type=exchange_token&client_id=my-trusted-client&token=57c7b8d0a8e25ae9ee4e4b3a3c658e05&scope=trust&userInfo=1
    I can see that version is upgraded to M6 .. But has this been a issue in older version and fixed in new version.

    Thanks
    Harshit

  • #2
    Originally posted by hrsht View Post
    I can see that version is upgraded to M6 .. But has this been a issue in older version and fixed in new version.
    Honestly, I don't know, and we can't rule out an interaction with your cache customization. The best thing for you might be to write a test case that reproduces your problem, and then use teh same test on the latest codebase.

    Comment

    Working...
    X