环境:apache-tomcat-8.0.32
servlet:2.5
spring-framework.version:4.2.4.RELEASE
jdk:1.7
shiro.version:1.2.4
spring-cache.version:2.2
报错提示:
org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [com.cpit.b2b.admin.common.shiro.UsernamePasswordToken - dingguirong, rememberMe=false (外网ip)]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).
at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:214)
at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)
at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270)
at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256)
at org.apache.shiro.web.filter.authc.AuthenticatingFilter.executeLogin(AuthenticatingFilter.java:53)
at org.apache.shiro.web.filter.authc.FormAuthenticationFilter.onAccessDenied(FormAuthenticationFilter.java:154)
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.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$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:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.shiro.cache.CacheException: org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: java.io.EOFException
at org.apache.shiro.cache.ehcache.EhCache.values(EhCache.java:182)
at org.apache.shiro.session.mgt.eis.CachingSessionDAO.getActiveSessions(CachingSessionDAO.java:345)
at com.cpit.b2b.admin.common.shiro.CacheSessionDAO.getActiveSessions(CacheSessionDAO.java:163)
at com.cpit.b2b.admin.common.shiro.CacheSessionDAO.getActiveSessions(CacheSessionDAO.java:146)
at com.cpit.b2b.admin.common.shiro.SystemAuthorizingRealm.doGetAuthenticationInfo(SystemAuthorizingRealm.java:80)
at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568)
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267)
at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)
... 39 more
Caused by: org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: java.io.EOFException
at org.apache.shiro.cache.ehcache.EhCache.get(EhCache.java:85)
at org.apache.shiro.cache.ehcache.EhCache.values(EhCache.java:172)
... 47 more
Caused by: net.sf.ehcache.CacheException: java.io.EOFException
at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:887)
at net.sf.ehcache.store.disk.Segment.decodeHit(Segment.java:182)
at net.sf.ehcache.store.disk.Segment.get(Segment.java:225)
at net.sf.ehcache.store.disk.DiskStore.fault(DiskStore.java:211)
at net.sf.ehcache.store.CacheStore$3.call(CacheStore.java:182)
at net.sf.ehcache.store.CacheStore$3.call(CacheStore.java:176)
at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.get(OnHeapCachingTier.java:327)
at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.access$200(OnHeapCachingTier.java:304)
at net.sf.ehcache.store.cachingtier.OnHeapCachingTier.get(OnHeapCachingTier.java:174)
at net.sf.ehcache.store.CacheStore.get(CacheStore.java:176)
at net.sf.ehcache.Cache.get(Cache.java:1635)
at org.apache.shiro.cache.ehcache.EhCache.get(EhCache.java:73)
... 48 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at java.io.DataInputStream.readLong(DataInputStream.java:416)
at java.io.ObjectInputStream$BlockDataInputStream.readLong(ObjectInputStream.java:2817)
at java.io.ObjectInputStream.readLong(ObjectInputStream.java:979)
at org.apache.shiro.session.mgt.SimpleSession.readObject(SimpleSession.java:491)
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:498)
at net.sf.ehcache.Element.readObject(Element.java:860)
at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:367)
at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:883)
... 59 more
你DEBUG你的login看看,到认证信息建立SimpleAuthenticationInfo的时候,用户信息还对不对,我是因为返回用户信息没有密码导致这个问题出现的.
PS:现在我的问题是密码对比一直显示密码错误,这是什么问题,求大神解!!!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。