shiro-redis是网上的大牛开源的一个插件(github地址:https://github.com/alexxiyang/shiro-redis ),最近在用它的时候老是报如下错误(版本是3.1.0):
We need a field to identify this Cache Object in Redis. So you need to defined an id field which you can get unique id to identify this principal. For example, if you use UserInfo as Principal class, the id field maybe userId, userName, email, etc. For example, getUserId(), getUserName(), getEmail(), etc.
Default value is authCacheKey or id, that means your principal object has a method called “getAuthCacheKey()” or “getId()”] with root cause
org.crazycake.shiro.exception.PrincipalInstanceException: class com.xxx.blog.base.LoginBean must has getter for field: authCacheKey or id
We need a field to identify this Cache Object in Redis. So you need to defined an id field which you can get unique id to identify this principal. For example, if you use UserInfo as Principal class, the id field maybe userId, userName, email, etc. For example, getUserId(), getUserName(), getEmail(), etc.
Default value is authCacheKey or id, that means your principal object has a method called “getAuthCacheKey()” or “getId()”
at org.crazycake.shiro.RedisCache.getRedisKeyFromPrincipalIdField(RedisCache.java:150)
at org.crazycake.shiro.RedisCache.getStringRedisKey(RedisCache.java:126)
at org.crazycake.shiro.RedisCache.getRedisCacheKey(RedisCache.java:118)
at org.crazycake.shiro.RedisCache.remove(RedisCache.java:103)
at org.apache.shiro.realm.AuthorizingRealm.clearCachedAuthorizationInfo(AuthorizingRealm.java:386)
at org.apache.shiro.realm.AuthorizingRealm.doClearCache(AuthorizingRealm.java:663)
at org.apache.shiro.realm.CachingRealm.clearCache(CachingRealm.java:170)
at org.apache.shiro.realm.CachingRealm.onLogout(CachingRealm.java:152)
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.onLogout(ModularRealmAuthenticator.java:290)
at org.apache.shiro.mgt.DefaultSecurityManager.logout(DefaultSecurityManager.java:562)
at org.apache.shiro.subject.support.DelegatingSubject.logout(DelegatingSubject.java:367)
at com.huangbl.blog.filter.CheckSessionControlFilter.onAccessDenied(CheckSessionControlFilter.java:94)
at org.apache.shiro.web.filter.AccessControlFilter.onAccessDenied(AccessControlFilter.java:133)
at org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:162)
at org.apache.shiro.web.filter.PathMatchingFilter.isFilterChainContinued(PathMatchingFilter.java:203)
at org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:178)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:131)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter
1.
c
a
l
l
(
A
b
s
t
r
a
c
t
S
h
i
r
o
F
i
l
t
e
r
.
j
a
v
a
:
365
)
a
t
o
r
g
.
a
p
a
c
h
e
.
s
h
i
r
o
.
s
u
b
j
e
c
t
.
s
u
p
p
o
r
t
.
S
u
b
j
e
c
t
C
a
l
l
a
b
l
e
.
d
o
C
a
l
l
(
S
u
b
j
e
c
t
C
a
l
l
a
b
l
e
.
j
a
v
a
:
90
)
a
t
o
r
g
.
a
p
a
c
h
e
.
s
h
i
r
o
.
s
u
b
j
e
c
t
.
s
u
p
p
o
r
t
.
S
u
b
j
e
c
t
C
a
l
l
a
b
l
e
.
c
a
l
l
(
S
u
b
j
e
c
t
C
a
l
l
a
b
l
e
.
j
a
v
a
:
83
)
a
t
o
r
g
.
a
p
a
c
h
e
.
s
h
i
r
o
.
s
u
b
j
e
c
t
.
s
u
p
p
o
r
t
.
D
e
l
e
g
a
t
i
n
g
S
u
b
j
e
c
t
.
e
x
e
c
u
t
e
(
D
e
l
e
g
a
t
i
n
g
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
o
r
L
i
g
h
t
.
p
r
o
c
e
s
s
(
A
b
s
t
r
a
c
t
P
r
o
c
e
s
s
o
r
L
i
g
h
t
.
j
a
v
a
:
66
)
a
t
o
r
g
.
a
p
a
c
h
e
.
c
o
y
o
t
e
.
A
b
s
t
r
a
c
t
P
r
o
t
o
c
o
l
1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol
1.call(AbstractShiroFilter.java:365)atorg.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)atorg.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)atorg.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)atorg.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)atorg.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)atorg.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)atorg.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)atorg.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
.
d
o
R
u
n
(
N
i
o
E
n
d
p
o
i
n
t
.
j
a
v
a
:
1415
)
a
t
o
r
g
.
a
p
a
c
h
e
.
t
o
m
c
a
t
.
u
t
i
l
.
n
e
t
.
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
B
a
s
e
.
r
u
n
(
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
B
a
s
e
.
j
a
v
a
:
49
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
r
u
n
W
o
r
k
e
r
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1149
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
SocketProcessor.doRun(NioEndpoint.java:1415) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor
SocketProcessor.doRun(NioEndpoint.java:1415)atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
大致意思是principal对象中必须要有authCacheKey或者id属性,且要有其对应的get方法。我特意去检查了下,我的loginBean中是有id属性的,但是是继承自父类的属性,问题就出在这里,应该我当时用的版本(3.1.0)是没有考虑到从父类去读取id属性的情况,把版本换成3.2.3立马就可以了(作者也在github中说过不要使用3.1.0以下版本,怪我自己没去注意)
然后这边要写对应的唯一id