Spring安全插件生成错误500未找到线程绑定请求(可能是因为插件)

Spring安全插件生成错误500未找到线程绑定请求(可能是因为插件),spring,grails,Spring,Grails,也许有人能帮我。我只是使用纯spring安全插件核心并执行s2 quickstart命令,该命令执行良好,直到您运行应用程序并产生以下错误: 错误500:Servlet:default URI:/jeepnee/异常消息:未找到线程绑定请求:您是指实际web请求之外的请求属性,还是在原始接收线程之外处理请求?如果您实际上是在web请求中操作,并且仍然收到此消息,那么您的代码可能是在DispatcherServlet/DispatcherPortlet之外运行的 可能插件有问题: plugins.

也许有人能帮我。我只是使用纯spring安全插件核心并执行s2 quickstart命令,该命令执行良好,直到您运行应用程序并产生以下错误:

错误500:Servlet:default URI:/jeepnee/异常消息:未找到线程绑定请求:您是指实际web请求之外的请求属性,还是在原始接收线程之外处理请求?如果您实际上是在web请求中操作,并且仍然收到此消息,那么您的代码可能是在DispatcherServlet/DispatcherPortlet之外运行的

可能插件有问题:

plugins.bubbling=2.1.3
plugins.class diagram=0.5.2
plugins.cloudfoundry=1.2
plugins.cloud support=1.0.6
plugins.flash播放器=1.4
plugins.grails ui=1.2.2
plugins.hibernate=1.3.7
plugins.navigation=1.3.2
plugins.resources=1.1.1
plugins.richui=0.8
plugins.swfobject=2.2.1
plugins.tomcat=1.3.7
plugins.yui=2.8.2.1

有人能启发我吗


我被这个问题困住了。这可能是一个插件与spring security冲突,spring security也通过运行时操作web.xml???

问题在于资源插件的旧版本。您需要最新版本的that和Spring Security Core,它们使用webxml插件在web.xml中适当地排序筛选器映射元素。

对于我来说,最新插件版本仍然存在此问题:

runtime ":spring-security-core:1.2.7.1"
runtime ":resources:1.1.6"
作为一种解决方法,我按照(BuildConfig.groovy)上的建议降级了

请为我创建的JIRA投票:


我在Grails 2.2.0中通过maven“mvn Grails:clean Grails:run app”运行应用程序时遇到了这个问题,而“Grails run app”单独运行正常,解决方法如下:

如果您使用的是Maven,请确保在pom.xml上有以下内容:

<dependency>
    <groupId>org.grails.plugins</groupId>
    <artifactId>webxml</artifactId>
    <version>1.4.1</version>
    <scope>runtime</scope>
    <type>zip</type>
</dependency>

这为我解决了Grails2.2.0的问题。

听起来有点像配置错误,你应该发布spring配置。插件的版本是什么,什么版本的Grails?我在将应用程序从1.3.7升级到Grails 2.0.0时遇到了这个问题,这就是解决方案。现在通过在BuildConfig中添加compile':webxml:1.4.1'修复了这个问题。groovy@MartinMoizard仅供参考-ssc 1.2.7.3和grails 2.2.0仍然存在问题。必须在pom.xml中添加webxml(使用Maven构建时),然后它就可以工作了。见下面我的答案。
<dependency>
    <groupId>org.grails.plugins</groupId>
    <artifactId>webxml</artifactId>
    <version>1.4.1</version>
    <scope>runtime</scope>
    <type>zip</type>
</dependency>
runtime ":webxml:1.4.1"