为了账号安全,请及时绑定邮箱和手机立即绑定

自定义inirealm报错

F:\java\jdk1.8.0_131\bin\java -ea -Didea.launcher.port=7537 "-Didea.launcher.bin.path=F:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\bin" -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath "F:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\lib\idea_rt.jar;F:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\plugins\junit\lib\junit-rt.jar;F:\java\jdk1.8.0_131\jre\lib\charsets.jar;F:\java\jdk1.8.0_131\jre\lib\deploy.jar;F:\java\jdk1.8.0_131\jre\lib\ext\access-bridge.jar;F:\java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;F:\java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;F:\java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;F:\java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;F:\java\jdk1.8.0_131\jre\lib\ext\localedata.jar;F:\java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;F:\java\jdk1.8.0_131\jre\lib\ext\sunec.jar;F:\java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;F:\java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;F:\java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;F:\java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;F:\java\jdk1.8.0_131\jre\lib\javaws.jar;F:\java\jdk1.8.0_131\jre\lib\jce.jar;F:\java\jdk1.8.0_131\jre\lib\jfr.jar;F:\java\jdk1.8.0_131\jre\lib\jfxswt.jar;F:\java\jdk1.8.0_131\jre\lib\jsse.jar;F:\java\jdk1.8.0_131\jre\lib\management-agent.jar;F:\java\jdk1.8.0_131\jre\lib\plugin.jar;F:\java\jdk1.8.0_131\jre\lib\resources.jar;F:\java\jdk1.8.0_131\jre\lib\rt.jar;E:\ideaworkspace\imooc-shiro\shiro-test\target\test-classes;F:\repos\org\apache\shiro\shiro-core\1.3.2\shiro-core-1.3.2.jar;F:\repos\org\slf4j\slf4j-api\1.6.4\slf4j-api-1.6.4.jar;F:\repos\comm


ons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;F:\repos\junit\junit\4.12\junit-4.12.jar;F:\repos\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;F:\repos\antlr\antlr\2.7.2\antlr-2.7.2.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.imooc.test.IniRealmTest,testAuthentication

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.


org.apache.shiro.authc.UnknownAccountException: Realm [org.apache.shiro.realm.text.IniRealm@1e94b0f] was unable to find account data for the submitted AuthenticationToken [org.apache.shiro.authc.UsernamePasswordToken - mark, rememberMe=false].


at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:184)

at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267)

at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)

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.imooc.test.IniRealmTest.testAuthentication(IniRealmTest.java:25)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)

at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)

at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)

at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)



Process finished with exit code -1


正在回答

2 回答

谢谢你的回答


0 回复 有任何疑惑可以回复我~

数据库里users, user_role, permission_roles 表没有响应的数据?

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

自定义inirealm报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信