Description
Hi,
The code is working fine. But when i change the package name of Authority class i get this exception. Can't I change it ? Below is the logs.
Old package : com.adamzareba.spring.security.oauth2.model.security.Authority
New package : com.mycompany.model.security.Authority
2020-06-29 23:28:48.544 [0;39m [33m WARN [0;39m [35m8968 [0;39m [2m--- [0;39m [2m[nio-8080-exec-5] [0;39m [36mo.s.s.o.p.token.store.JdbcTokenStore [0;39m [2m: [0;39m Failed to deserialize authentication for cb7aab39-c5d5-430b-9dac-818c96bb456c
java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.adamzareba.spring.security.oauth2.model.security.Authority
at org.springframework.security.oauth2.common.util.SerializationUtils.deserialize(SerializationUtils.java:50) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore.deserializeAuthentication(JdbcTokenStore.java:405) [spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore$3.mapRow(JdbcTokenStore.java:198) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore$3.mapRow(JdbcTokenStore.java:196) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:667) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]