【问题标题】:Spring Security Plugin produces error 500 No thread-bound request found(Maybe because of a Plugin)Spring Security Plugin 产生错误 500 No thread-bound request found(可能是因为插件)
【发布时间】:2012-01-21 19:34:52
【问题描述】:

也许有人可以帮助我。我只是使用普通的 spring-security-plugin 核心并执行 s2-quickstart 命令,该命令执行良好,直到您运行应用程序并产生此错误:

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

插件可能有问题:

plugins.bubbling=2.1.3
plugins.class-diagram=0.5.2
plugins.cloud-foundry=1.2
plugins.cloud-support=1.0.6
plugins.flash-player=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 冲突,谁也通过运行时进行 web.xml 操作??

【问题讨论】:

  • 听起来有点像配置错误,应该贴一下spring的配置。
  • 什么版本的插件,什么版本的Grails?

标签: spring grails


【解决方案1】:

问题是资源插件的旧版本。您需要它的最新版本和 Spring Security Core,它使用 webxml 插件对 web.xml 中的过滤器映射元素进行适当的排序。

【讨论】:

  • 我在将应用程序从 1.3.7 升级到 Grails 2.0.0 时遇到了这个问题,这就是解决方案。
【解决方案2】:

对我来说,这个问题在最新的插件版本中仍然存在:

runtime ":spring-security-core:1.2.7.1"
runtime ":resources:1.1.6"

作为一种解决方法,我按照mailing list (BuildConfig.groovy) 中的建议进行了降级

runtime ":spring-security-core:1.2.4"

请为我创建的这个 JIRA 投票:

http://jira.grails.org/browse/GPCLOUDFOUNDRY-32

【讨论】:

  • 现在已通过在 BuildConfig.groovy 中添加 compile ':webxml:1.4.1' 来修复
  • @MartinMoizard fyi - ssc 1.2.7.3 和 grails 2.2.0 仍然存在问题。必须在 pom.xml 中添加 webxml(使用 Maven 构建时),然后它才起作用。请参阅下面的答案。
【解决方案3】:

我在 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>

在 BuildConfig 中,groovy:

runtime ":webxml:1.4.1"

这为我解决了 Grails 2.2.0 的问题。

【讨论】:

    猜你喜欢
    • 2021-11-13
    • 1970-01-01
    • 1970-01-01
    • 2013-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-24
    相关资源
    最近更新 更多