2012-03-01 10 views
0

をインストールした後、私は私のサーバーへの要求ごとに、次のエラーを取得開始しました:ノースレッドバウンド例外は、Grailsのプロファイラプラグイン

2012-03-01 14:57:42,224 ERROR: [[default]] Servlet.service() for servlet default threw exception 
java.lang.IllegalStateException: 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. 
    at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) 
    at org.codehaus.groovy.grails.web.util.WebUtils.retrieveGrailsWebRequest(WebUtils.java:497) 
    at org.codehaus.groovy.grails.plugins.springsecurity.AnnotationFilterInvocationDefinition.determineUrl(AnnotationFilterInvocationDefinition.java:63) 
    at org.codehaus.groovy.grails.plugins.springsecurity.AbstractFilterInvocationDefinition.getAttributes(AbstractFilterInvocationDefinition.java:77) 
    at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:171) 
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:106) 

必要に応じて完全な例外を貼り付けることができます。プラグインをアンインストールすると、エラーが表示されなくなります。

私は、関連する問題については、検索のGrails 1.3.7

を実行していて、これは私が見つけることができる最も近い:http://padcom13.blogspot.com/2011/12/grails-heroku-and-spring-security-core.html私はPadcomが提案修正を試みたが、ここで働いていないようでした。

誰でもこの問題に遭遇しましたか、それを修正する方法がありますか?

答えて

0

さて、ここの問題はわかりにくいものでした。 Burtは正しい道にあり、webxmlがインストールされていることに関連していました。インストールされたスプリングセキュリティコアバージョン1.1.3がエラーを引き起こしていたようです。 1.2.7にアップデートしたとき(このスレッドでBurtが提案したように:http://grails.1312388.n4.nabble.com/No-thread-bound-request-error-with-Spring-security-ldap-plugin-on-Grails-2-td4270779.html)、問題はなくなり、問題なくプロファイラをインストールできました。

ここで、奇妙な点は、webxmlがインストールされている(すべてのバージョン)場合にのみ、spring-security-core 1.1.3がこの例外を引き起こすように見えることです。

2

これを今週初めにプラグインのバージョン0.4で修正しました。これはwebxmlプラグインに依存しますが、バージョン0.4で自動的にインストールされます。そうでない場合は、手動でインストールできます。

+0

私はバージョン0.4でこれを取得していました。あなたの修正プログラムは1.3.7で動作しましたか?他のプラグインが干渉している可能性があります。どのバージョンのwebxmlを使用するべきですか? – dhore

+0

最新 - 1.4.1。 'install-plugin'か' BuildConfig.groovy'のどちらかで、プロファイラプラグインと同じ方法でインストールしてください。 –

+0

コンパイルスコーププラグインとして、それを試してみました。私は問題がwebxmlであることを確認しました。それを独自にインストールすると(バージョン1.4.1でも)エラーが出ます。 – dhore

関連する問題