{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/777","repository_url":"https://api.github.com/repos/spring-projects/spring-session","labels_url":"https://api.github.com/repos/spring-projects/spring-session/issues/777/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-session/issues/777/comments","events_url":"https://api.github.com/repos/spring-projects/spring-session/issues/777/events","html_url":"https://github.com/spring-projects/spring-session/issues/777","id":226893449,"number":777,"title":"Running into deserialization issues","user":{"login":"atif92","id":6507980,"avatar_url":"https://avatars0.githubusercontent.com/u/6507980?v=3","gravatar_id":"","url":"https://api.github.com/users/atif92","html_url":"https://github.com/atif92","followers_url":"https://api.github.com/users/atif92/followers","following_url":"https://api.github.com/users/atif92/following{/other_user}","gists_url":"https://api.github.com/users/atif92/gists{/gist_id}","starred_url":"https://api.github.com/users/atif92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atif92/subscriptions","organizations_url":"https://api.github.com/users/atif92/orgs","repos_url":"https://api.github.com/users/atif92/repos","events_url":"https://api.github.com/users/atif92/events{/privacy}","received_events_url":"https://api.github.com/users/atif92/received_events","type":"User","site_admin":false},"labels":[{"id":108462543,"url":"https://api.github.com/repos/spring-projects/spring-session/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"vpavic","id":1149230,"avatar_url":"https://avatars2.githubusercontent.com/u/1149230?v=3","gravatar_id":"","url":"https://api.github.com/users/vpavic","html_url":"https://github.com/vpavic","followers_url":"https://api.github.com/users/vpavic/followers","following_url":"https://api.github.com/users/vpavic/following{/other_user}","gists_url":"https://api.github.com/users/vpavic/gists{/gist_id}","starred_url":"https://api.github.com/users/vpavic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpavic/subscriptions","organizations_url":"https://api.github.com/users/vpavic/orgs","repos_url":"https://api.github.com/users/vpavic/repos","events_url":"https://api.github.com/users/vpavic/events{/privacy}","received_events_url":"https://api.github.com/users/vpavic/received_events","type":"User","site_admin":false},"assignees":[{"login":"vpavic","id":1149230,"avatar_url":"https://avatars2.githubusercontent.com/u/1149230?v=3","gravatar_id":"","url":"https://api.github.com/users/vpavic","html_url":"https://github.com/vpavic","followers_url":"https://api.github.com/users/vpavic/followers","following_url":"https://api.github.com/users/vpavic/following{/other_user}","gists_url":"https://api.github.com/users/vpavic/gists{/gist_id}","starred_url":"https://api.github.com/users/vpavic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpavic/subscriptions","organizations_url":"https://api.github.com/users/vpavic/orgs","repos_url":"https://api.github.com/users/vpavic/repos","events_url":"https://api.github.com/users/vpavic/events{/privacy}","received_events_url":"https://api.github.com/users/vpavic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-05-07T20:55:59Z","updated_at":"2017-05-08T09:00:07Z","closed_at":null,"body":"I am using spring boot starter parent (default versions of spring sessions ) with external  redis 3.0.7 and I have an auth server along with 2 client apps. I am sharing the session among all my client apps which are simply replica of each other to achieve google like sso.\r\n\r\nThis is the code of one of the client app:\r\n\r\n`@EnableRedisHttpSession\r\n@SpringBootApplication\r\n@EnableOAuth2Sso\r\n@RestController\r\n@Component\r\n\r\npublic class ClientApplication extends WebSecurityConfigurerAdapter {\r\n\r\n\t@RequestMapping({ \"/user\", \"/me\" })\r\n\tpublic Principal user(Principal principal) {\r\n\t\treturn principal;\r\n\t}\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tnew SpringApplicationBuilder(ClientApplication.class).properties(\"spring.config.name=client\").run(args);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\r\n\t\thttp.antMatcher(\"/**\").authorizeRequests()\r\n\t\t\t\t.antMatchers(\"/page1Pub**\", \"/publicpg**\", \"/login**\", \"/index**\", \"/webjars/**\").permitAll()\r\n\t\t\t\t.anyRequest().authenticated().and().authorizeRequests().anyRequest().fullyAuthenticated().and().logout()\r\n\t\t\t\t.invalidateHttpSession(true).logoutSuccessUrl(\"/\").permitAll()\r\n\t\t\t\t.logoutRequestMatcher(new AntPathRequestMatcher(\"/logout\")).and().csrf()\r\n\t\t\t\t.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());\r\n\t\thttp.httpBasic().disable().authorizeRequests().anyRequest().authenticated().and().csrf().disable();\r\n\r\n\t\t// @formatter:on\r\n\t}\r\n\r\n}\r\n`\r\n\r\n\r\nI dont know why after some time the application gives the error that is below:\r\n\r\n\r\n\r\norg.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.lang.ClassCastException: cannot assign instance of org.springframework.beans.factory.support.StaticListableBeanFactory to field org.springframework.aop.scope.DefaultScopedObject.beanFactory of type org.springframework.beans.factory.config.ConfigurableBeanFactory in instance of org.springframework.aop.scope.DefaultScopedObject\r\n\tat org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.deserialize(JdkSerializationRedisSerializer.java:81) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.core.AbstractOperations.deserializeHashValue(AbstractOperations.java:338) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.core.AbstractOperations.deserializeHashMap(AbstractOperations.java:282) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:227) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.session.data.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.0.RELEASE.jar:na]\r\n\tat org.springframework.session.data.redis.RedisOperationsSessionRepository.onMessage(RedisOperationsSessionRepository.java:519) ~[spring-session-1.3.0.RELEASE.jar:na]\r\n\tat org.springframework.data.redis.listener.RedisMessageListenerContainer.executeListener(RedisMessageListenerContainer.java:249) [spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.listener.RedisMessageListenerContainer.processMessage(RedisMessageListenerContainer.java:239) [spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat org.springframework.data.redis.listener.RedisMessageListenerContainer$1.run(RedisMessageListenerContainer.java:967) [spring-data-redis-1.8.0.RC1.jar:na]\r\n\tat java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]\r\nCaused by: 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.lang.ClassCastException: cannot assign instance of org.springframework.beans.factory.support.StaticListableBeanFactory to field org.springframework.aop.scope.DefaultScopedObject.beanFactory of type org.springframework.beans.factory.config.ConfigurableBeanFactory in instance of org.springframework.aop.scope.DefaultScopedObject\r\n\tat org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:78) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]\r\n\tat org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:36) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]\r\n\tat org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.deserialize(JdkSerializationRedisSerializer.java:79) ~[spring-data-redis-1.8.0.RC1.jar:na]\r\n\t... 10 common frames omitted\r\nCaused by: java.lang.ClassCastException: cannot assign instance of org.springframework.beans.factory.support.StaticListableBeanFactory to field org.springframework.aop.scope.DefaultScopedObject.beanFactory of type org.springframework.beans.factory.config.ConfigurableBeanFactory in instance of org.springframework.aop.scope.DefaultScopedObject\r\n\tat java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2133) ~[na:1.8.0_66]\r\n\tat java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1305) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2006) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readArray(ObjectInputStream.java:1707) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:501) ~[na:1.8.0_66]\r\n\tat org.springframework.aop.framework.AdvisedSupport.readObject(AdvisedSupport.java:557) ~[spring-aop-4.3.5.RELEASE.jar:4.3.5.RELEASE]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_66]\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_66]\r\n\tat java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66]\r\n\tat java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[na:1.8.0_66]\r\n\tat java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) ~[na:1.8.0_66]\r\n\tat org.springframework.core.serializer.DefaultDeserializer.deserialize(DefaultDeserializer.java:70) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]\r\n\tat org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:73) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]\r\n\t... 12 common frames omitted\r\n\r\n\t\r\n\r\n\r\n\r\nPlease help me as it destabilize the client applications and hence they fail on login. "},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/comments/299812028","html_url":"https://github.com/spring-projects/spring-session/issues/777#issuecomment-299812028","issue_url":"https://api.github.com/repos/spring-projects/spring-session/issues/777","id":299812028,"user":{"login":"atif92","id":6507980,"avatar_url":"https://avatars0.githubusercontent.com/u/6507980?v=3","gravatar_id":"","url":"https://api.github.com/users/atif92","html_url":"https://github.com/atif92","followers_url":"https://api.github.com/users/atif92/followers","following_url":"https://api.github.com/users/atif92/following{/other_user}","gists_url":"https://api.github.com/users/atif92/gists{/gist_id}","starred_url":"https://api.github.com/users/atif92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atif92/subscriptions","organizations_url":"https://api.github.com/users/atif92/orgs","repos_url":"https://api.github.com/users/atif92/repos","events_url":"https://api.github.com/users/atif92/events{/privacy}","received_events_url":"https://api.github.com/users/atif92/received_events","type":"User","site_admin":false},"created_at":"2017-05-08T09:00:07Z","updated_at":"2017-05-08T09:00:07Z","body":"@vpavic it seems #395 has some scopes and id related issue but by error is different. Ill try to run all clients on different hosts. will it make any difference?"}}
{"actor":{"display_login":"atif92"}}