Uploaded image for project: 'Spring Social'
  1. Spring Social
  2. SOCIAL-470

Null-pointer exception when calling sign-in with twitter.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hello,

      I have a sign-in with Twitter functionality on my website and it was working fine for a few months. Then I upgraded to 1.1.2.RELEASE and now I try to login with twitter i get redirected to twitter, I click on sign in but then i come back to my website and I get a null-pointer exception:

      2015-06-08 23:52:42,862 org.springframework.social.connect.web.ProviderSignInController [http-nio-127.0.0.1-8111-exec-1] ERROR: Exception while completing OAuth 1.0(a) connection: 
      java.lang.NullPointerException
      	at org.springframework.social.oauth1.AuthorizedRequestToken.getValue(AuthorizedRequestToken.java:46)
      	at org.springframework.social.oauth1.OAuth1Template.exchangeForAccessToken(OAuth1Template.java:130)
      	at org.springframework.social.connect.web.ConnectSupport.completeConnection(ConnectSupport.java:143)
      	at org.springframework.social.connect.web.ProviderSignInController.oauth1Callback(ProviderSignInController.java:203)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
      	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221
      

      I also tried downgrading to version 1.1.0 I get this exception:

      2015-06-08 23:45:36,278 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[dispatcherServlet] [http-nio-8112-exec-6] ERROR: Servlet.service() for servlet [dispatcherServlet] in context with path [/storefront] threw exception
      org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: org.springframework.social.connect.support.ConnectionFactoryRegistry
      	at org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.serialize(JdkSerializationRedisSerializer.java:52)
      	at org.springframework.data.redis.core.AbstractOperations.rawHashValue(AbstractOperations.java:166)
      	at org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:128)
      	at org.springframework.data.redis.core.DefaultBoundHashOperations.putAll(DefaultBoundHashOperations.java:85)
      	at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.saveDelta(RedisOperationsSessionRepository.java:409)
      	at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.access$000(RedisOperationsSessionRepository.java:331)
      	at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:211)
      	at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:141)
      	at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.commitSession(SessionRepositoryFilter.java:172)
      	at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.access$100(SessionRepositoryFilter.java:151)
      	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:113)
      	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:65)
      	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
      	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
      
      

        Attachments

          Activity

            People

            • Assignee:
              habuma Craig Walls
              Reporter:
              ptahchiev Petar Tahchiev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: