- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
注意:此题还没有正确答案!
我正在运行带有 Spring Security 2.0RC5 和 ACL 2RC2 的 Grails 2.4.5。当我使用 ROLE_ADMIN 和 ROLE_USER 帐户登录时,有时会出现以下错误。
2015-08-28 16:05:17,994 [http-nio-8080-exec-7] ERROR [/majestella].[grails] - Servlet.service() for servlet grails threw exception
Message: Unable to find ACL information for object identity 'org.springframework.security.acls.domain.ObjectIdentityImpl[Type: majestella.Company; Identifier: 50e396b8eebefc5a84]'
Line | Method
->> 292 | readAclsById in grails.plugin.springsecurity.acl.AclService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 38 | myhotels in majestella.admin.AdminHotelController
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Error |
2015-08-28 16:05:18,035 [http-nio-8080-exec-7] ERROR errors.GrailsExceptionResolver - NotFoundException occurred when processing request: [GET] /majestella/admin
Unable to find ACL information for object identity 'org.springframework.security.acls.domain.ObjectIdentityImpl[Type: majestella.Company; Identifier: 50e396b8eebefc5a84]'. Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:include>: Unable to execute include: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [myhotels] of controller [majestella.admin.AdminHotelController] caused exception: Runtime error executing action
Line | Method
->> 527 | doFilter in /grails-app/views/admin/index.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Error executing tag <g:include>: Unable to execute include: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [myhotels] of controller [majestella.admin.AdminHotelController] caused exception: Runtime error executing action
->> 32 | doCall in /grails-app/views/admin/index.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by ControllerExecutionException: Unable to execute include: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [myhotels] of controller [majestella.admin.AdminHotelController] caused exception: Runtime error executing action
->> 32 | doCall in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [myhotels] of controller [majestella.admin.AdminHotelController] caused exception: Runtime error executing action
->> 116 | logThrowable in grails.plugin.cache.web.filter.AbstractFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 70 | doFilter in ''
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by ControllerExecutionException: Executing action [myhotels] of controller [majestella.admin.AdminHotelController] caused exception: Runtime error executing action
->> 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by ControllerExecutionException: Runtime error executing action
->> 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by InvocationTargetException: null
->> 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by NotFoundException: Unable to find ACL information for object identity 'org.springframework.security.acls.domain.ObjectIdentityImpl[Type: majestella.Company; Identifier: 50e396b8eebefc5a84]'
->> 292 | readAclsById in grails.plugin.springsecurity.acl.AclService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 38 | myhotels in majestella.admin.AdminHotelController
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 32 | doCall . . . . . in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp$_run_closure2
| 39 | run in Users_mg_Documents_Grails_GGTS3_6_4_Server_majestella_grails_app_views_admin_index_gsp
| 198 | doFilter . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
在同一页面上使用具有 ROLE_USER 的帐户我没有收到此错误。
当我重新启动服务器时,ROLE_ADMIN 和 ROLE_USER 用户的错误消失了。可能存在一些缓存问题。
如何修复此错误?
编辑:这是我要求的普惠制:
some html code
<g:include controller="adminUser" action="myUsers" />
我的 Controller 使用 Spring Security Annotation:
@Secured(AccessRole.ROLE_USER)
class AdminController {
def index() {}
}
编辑:这是我包含的 GSP 的内容:
<%@ page import="test.Hotel" %>
<g:each in="${hotels}" var="hotel">
<g:render template="hotel" model="[hotel: hotel]" />
</g:each>
最佳答案
我至少还需要查看您的 GSP,但我敢打赌您的问题与 <g:include>
的使用有关以及您如何使用 SpringSecurity。
您可以尝试删除 <g:include>
从您的页面中提取标签并再次运行您的测试?
问题在于 Spring Security 是使用 Servlet 过滤器实现的,并且您在检查后包含安全内容。
可能的解决方法:
例如,将您的 includes 包含在 spring security 标签中,以便仅在用户具有正确的角色时显示:
<sec:ifAnyGranted roles="ROLE_USER">
<g:include controller="adminUser" action="myUsers" />
</sec:ifAnyGranted>
[]的
关于java - 无法找到对象标识 'org.springframework.security.acls.domain.ObjectIdentityImpl 的 ACL 信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31701823/
刚开始处理Maven和Spring。当我尝试创建DAO和ResultSet然后运行应用程序时,抛出errors: Error:(4, 31) java: package org.springframe
问题: Error:(15, 10) java: cannot find symbol symbol: class SpringRunner Error:(16, 2) java: cannot
我正在尝试构建这个 RESTful 服务示例:https://spring.io/guides/gs/rest-service/GreetingController.java 的导入没有错误: pac
如果我尝试向构造函数注入(inject) Facebook 参数,我将尝试使用 facebook api 使用 spring + thymeleaf + hibernate 创建 Facebook 应
如何解决Spring中Bean的自动连接歧义?我们有一个 Dessert 接口(interface),并且有实现该接口(interface)(Dessert)的三种不同的甜点(Bean)。 今天的甜点
请问为什么我的 pom.xml 文件中会出现此错误 Missing artifact org.springframework:spring-context:jar:${org.springframew
让 gradle 构建正常工作( from a previous question related to this one ),安迪·威尔金森(Andy Wilkinson)为我回答,没有问题。正在为
我正在 tomcat 7 中开发网站(spring 3.1.1),但出现错误 ERROR: org.springframework.web.context.ContextLoader - Contex
我在将航类信息保存到 mysql 数据库时遇到错误。请帮助我下面是我的代码: 我已经尝试了所有方法,添加模式和这么多 它不会从字符串转换为日期 控制台日志 2020-05-12 13:19:21.04
我使用intellij创建了一个小型java应用程序,后来我使用“添加框架支持”选项将该项目更新为Maven项目。当我厌倦了在项目上添加 spring jar 文件时,出现以下错误:“没有为 org.
我尝试使用 org.springframework.data.mongodb.core.MongoOperations 从 mongo 集合中查询记录。我在 CompanyTemplRepoImpl
我尝试将 Spring4 与 Hibernate5 一起使用,但出现此错误: org.springframework.orm.jpa.EntityManagerHolder cannot be cas
我是这个论坛的新手。我正在尝试使用 spring 3.2.6 和 tomcat 7.0 制作一个应用程序。我已将所有必需的 jar 添加到 WEB-INF/lib 文件夹中。 DispatcherSe
我在 maven 架构中使用 Spring 框架 4.0.1.RELEASE、OAuth Security 2.0.7.RELEASE,当我编译代码时,出现以下错误。 SEVERE: Exceptio
我正在使用以下指令开发 CRUD Web 应用程序: https://www.javaguides.net/2019/02/spring-boot-2-angular-7-crud-example-t
这个问题已经有答案了: what is the difference in org.springframework.web.servlet.ModelAndView vs org.springfram
我正在尝试将 hibernate 与 spring boot 一起使用。但我收到此错误:org.springframework.orm.jpa.EntityManagerHolder 无法转换为 or
我尝试创建简单的用户登录和注册页面。但我无法使用服务方法创建用户。我有创建新用户的服务。 @Service public class LocalUserDetailsService implement
我用 STS、Roo 和 GWT 创建了一个新项目,并尝试包含 Spring Security。 从那时起,我收到以下错误。有没有人知道出了什么问题?! org.springframework.bea
这些是我正在使用的版本和依赖项 我怀疑版本需要更改但更改为什么,我不确定 springCore : '5.3.3', springjdbc
我是一名优秀的程序员,十分优秀!