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)

GitHub | vaadin-bot | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    SpringUIProvider's webApplicationContext field is not serializable

    GitHub | 7 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)
  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

    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Sping session tries serialize service with session scope

    Stack Overflow | 2 months ago | jonasasx
    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.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received an object of type [my.example.MyService$$EnhancerBySpringCGLIB$$442fa3ef_5]

  1. Nirav Patel 1 times, last 1 year ago

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.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)

    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:146)
    3. org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:128)
    4. org.springframework.data.redis.core.DefaultBoundHashOperations.putAll(DefaultBoundHashOperations.java:85)
    4 frames