会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132452个问题
WEB前端全系列/第十阶段:Nodejs编程模块/Express框架 9002楼
JAVA 全系列/第一阶段:JAVA 快速入门/数组和数据存储 9003楼
Python 全系列/第二阶段:Python 深入与提高/坦克大战 9005楼
Python 全系列/第三阶段:Python 网络与并发编程/网络通信 9006楼
JAVA 全系列/第一阶段:JAVA 快速入门/IDEA的使用和第一个java项目 9008楼
Python 全系列/第一阶段:Python入门/编程基本概念 9012楼

log4j:WARN No appenders could be found for logger (org.apache.shiro.io.ResourceUtils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - zs, rememberMe=false].  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 com.bjsxt.shiro1.TestA.main(TestA.java:41)
Caused by: java.lang.IllegalStateException: Configuration error:  No realms have been configured!  One or more realms must be present to execute an authentication attempt.
	at org.apache.shiro.authc.pam.ModularRealmAuthenticator.assertRealmsConfigured(ModularRealmAuthenticator.java:161)
	at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:264)
	at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)
	... 4 more

上面是异常信息,我的代码和老师一样,而且我把老师的代码拷贝过去也是这个异常,我用的是MyEclipse

JAVA 全系列/第九阶段:权限控制与安全认证/Shiro(旧) 9014楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/容器(旧) 9015楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637