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

Spring JIRA | Petar Tahchiev | 2 years ago
  1. 0

    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: {code} 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 {code} I also tried downgrading to version 1.1.0 I get this exception: {code} 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) {code}

    Spring JIRA | 2 years ago | Petar Tahchiev
    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
  2. 0

    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: {code} 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 {code} I also tried downgrading to version 1.1.0 I get this exception: {code} 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) {code}

    Spring JIRA | 2 years ago | Petar Tahchiev
    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
  3. 0

    SpringUIProvider's webApplicationContext field is not serializable

    GitHub | 3 months ago | vaadin-bot
    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.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - field (class "com.vaadin.spring.server.SpringUIProvider", name: "webApplicationContext", type: "interface org.springframework.web.context.WebApplicationContext") - object (class "com.vaadin.spring.server.SpringUIProvider", com.vaadin.spring.server.SpringUIProvider@d30bfca) - custom writeObject data (class "java.util.LinkedList") - object (class "java.util.LinkedList", [com.vaadin.spring.server.SpringUIProvider@d30bfca]) - field (class "com.vaadin.server.VaadinSession", name: "uiProviders", type: "class java.util.LinkedList") - root object (class "com.vaadin.server.VaadinSession", com.vaadin.server.VaadinSession@6241ff1a)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring-session and spring-social

    GitHub | 2 years ago | hlassiege
    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.security.SocialAuthenticationServiceRegistry
  6. 0

    RedisTemplate SerializationFailedException: Failed to deserialize payload 异常解决--扒带有瘾的文章--CFANZ社区--IT技术分享网站

    cfanz.cn | 1 year ago
    org.springframework.data.redis.serializer.SerializationException: Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.EOFException

  1. Nirav Patel 1 times, last 9 months ago
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. 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()
  2. Spring Data Redis
    DefaultBoundHashOperations.putAll
    1. org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.serialize(JdkSerializationRedisSerializer.java:52)
    2. org.springframework.data.redis.core.AbstractOperations.rawHashValue(AbstractOperations.java:166)
    3. org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:128)
    4. org.springframework.data.redis.core.DefaultBoundHashOperations.putAll(DefaultBoundHashOperations.java:85)
    4 frames
  3. org.springframework.session
    OncePerRequestFilter.doFilter
    1. org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.saveDelta(RedisOperationsSessionRepository.java:409)
    2. org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.access$000(RedisOperationsSessionRepository.java:331)
    3. org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:211)
    4. org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:141)
    5. org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.commitSession(SessionRepositoryFilter.java:172)
    6. org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.access$100(SessionRepositoryFilter.java:151)
    7. org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:113)
    8. org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:65)
    8 frames
  4. Spring
    CompositeFilter.doFilter
    1. org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
    2. org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
    2 frames