Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep serialVersionUID of SimpleGrantedAuthority constant #5910

Closed
quaff opened this issue Sep 29, 2018 · 1 comment
Closed

Keep serialVersionUID of SimpleGrantedAuthority constant #5910

quaff opened this issue Sep 29, 2018 · 1 comment
Assignees
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@quaff
Copy link
Contributor

quaff commented Sep 29, 2018

InvalidClassException raised every time upgrade spring-security, please keep it if nothing changed, It's not recommended to change it.

Caused 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.io.InvalidClassException: org.springframework.security.core.authority.SimpleGrantedAuthority; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 500
	at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:78) ~[spring-core-5.0.7.jar:5.0.7.RELEASE]
	at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:36) ~[spring-core-5.0.7.jar:5.0.7.RELEASE]
	at org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.deserialize(JdkSerializationRedisSerializer.java:82) ~[spring-data-redis-2.0.3.jar:2.0.3.RELEASE]
	... 72 more
Caused by: java.io.InvalidClassException: org.springframework.security.core.authority.SimpleGrantedAuthority; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 500
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:689) ~[?:?]
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1903) ~[?:?]
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1772) ~[?:?]
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2060) ~[?:?]
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1594) ~[?:?]
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:430) ~[?:?]

@rwinch rwinch self-assigned this Oct 3, 2018
@rwinch rwinch added the status: declined A suggestion or change that we don't feel we should currently apply label Oct 3, 2018
@rwinch
Copy link
Member

rwinch commented Oct 3, 2018

Thanks for the report. Spring Security is not intended to be serialized between versions. See #1945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

2 participants