我们在用Shiro构件时发生报错,请大家帮忙看一下,谢谢!

Blade-xu 发布于 2015/03/10 17:05
阅读 9K+
收藏 0
javax.servlet.ServletException: java.lang.IllegalArgumentException: Wildcard string cannot be null or empty. Make sure permission strings are properly formatted.
	org.apache.shiro.web.servlet.AdviceFilter.cleanup(AdviceFilter.java:196)
	org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:148)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)

root cause

java.lang.IllegalArgumentException: Wildcard string cannot be null or empty. Make sure permission strings are properly formatted.
	org.apache.shiro.authz.permission.WildcardPermission.setParts(WildcardPermission.java:151)
	org.apache.shiro.authz.permission.WildcardPermission.<init>(WildcardPermission.java:142)
	org.apache.shiro.authz.permission.WildcardPermission.<init>(WildcardPermission.java:138)
	org.apache.shiro.authz.permission.WildcardPermissionResolver.resolvePermission(WildcardPermissionResolver.java:41)
	org.apache.shiro.realm.AuthorizingRealm.resolvePermissions(AuthorizingRealm.java:433)
	org.apache.shiro.realm.AuthorizingRealm.getPermissions(AuthorizingRealm.java:409)
	org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:466)
	org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:462)
	org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:457)
	org.apache.shiro.authz.ModularRealmAuthorizer.isPermitted(ModularRealmAuthorizer.java:223)
	org.apache.shiro.mgt.AuthorizingSecurityManager.isPermitted(AuthorizingSecurityManager.java:113)
	org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158)
	org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter.isAccessAllowed(PermissionsAuthorizationFilter.java:45)
	org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:162)
	org.apache.shiro.web.filter.PathMatchingFilter.isFilterChainContinued(PathMatchingFilter.java:203)
	org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:178)
	org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:131)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
加载中
0
粉薯
粉薯
帅哥, 问题解决了吗
0
d
dandre

这个问题是你读数据库权限时有个权限为空。是你的数据库问题。

你debug到这句话,at org.apache.shiro.authz.permission.WildcardPermissionResolver.resolvePermission(WildcardPermissionResolver.java:41)

有个

permissionString
为空。

WildcardPermissionResolver
类的方法:

public Permission resolvePermission(String permissionString) { return new WildcardPermission(permissionString);
}


0
Blade-xu
Blade-xu
感谢回复,已经解决了。谢谢!
卧槽_屎里有毒
卧槽_屎里有毒
你的这个问题是如何决解的??
0
w
wjh6310

怎么解决的?

 

返回顶部
顶部