具有弹簧安全性的Grails应用程序在WAS7上导致500过滤器错误

时间:2012-01-06 17:22:12

标签: grails spring-security websphere-7

我已经使用相同的WebSphere配置部署了此应用程序的早期版本,但我使用的是grails 1.3.7,但没有使用资源或webxml插件。

我可以部署到Tomcat但是当我向WebSphere部署相同的war时,我在尝试访问应用程序时收到以下错误:

Error 500: No thread-bound request found: Are you referring to request attributes outside       of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use   RequestContextListener or RequestContextFilter to expose the current request.
Exception Message: No thread-bound request found: Are you referring to request attributes   outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. 
Caused by: Filter [springSecurityFilterChain]: filter is unavailable.

Grails版本:2.0.0 Groovy版本:1.8.4 JVM版本:1.6.0_29

安装的插件 核心 - 2.0.0 资源 - 1.1.6 webxml - 1.4.1 servlets - 2.0.0 springSecurityCore - 1.2.7 springSecurityLdap - 1.0.5

我已将webcontainer上的invokeFiltersCompatibility自定义属性设置为true。

1 个答案:

答案 0 :(得分:1)

如果在web.xml中使用属性:metadata-complete =“true”,则Websphere将保留web.xml。要编辑web.xml,必须使用grails“install-templates”命令获取web.xml文件的工作副本。

另见: http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/IBM_Websphere/Q_26625087.html