Spring Security Core Plugin
  1. Spring Security Core Plugin
  2. GPSPRINGSECURITYCORE-98

Error 500 due to java.lang.IllegalStateException: No thread-bound request found

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: Grails-Spring-Security-Core 1.1.3
    • Labels:
      None
    • Environment:
      Grails 2.0.0.M1

      Description

      To reproduce:
      grails create-app spring-500
      cd spring-500
      grails install-plugin spring-security-core
      grails s2-quickstart
      grails run-app
      -> visit http://localhost:8080/spring-500/

      Error 500: Internal Server Error

      URI
      /spring-500/
      Class
      java.lang.IllegalStateException
      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.

      Trace

      Line | Method
      ->> 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor

      • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        603 run in java.util.concurrent.ThreadPoolExecutor$Worker
        ^ 679
        run . . . in java.lang.Thread

        Issue Links

          Activity

          Hide
          Brian Saville added a comment -

          Mine was fixed (or perhaps it was something else???) by using resources-1.1.5.BUILD-SNAPSHOT

          Show
          Brian Saville added a comment - Mine was fixed (or perhaps it was something else???) by using resources-1.1.5.BUILD-SNAPSHOT
          Hide
          Markus Härnvi added a comment -

          I got rid of the error by adding a explicit dependency on webxml 1.4.1 in application.properties.
          I still have an issue on Windows. The CSS-bundle is not found after this change. So I think there is still an issue with the web.xml when mixing spring-security and the resource plugins. It works fine on Mac though.

          Show
          Markus Härnvi added a comment - I got rid of the error by adding a explicit dependency on webxml 1.4.1 in application.properties. I still have an issue on Windows. The CSS-bundle is not found after this change. So I think there is still an issue with the web.xml when mixing spring-security and the resource plugins. It works fine on Mac though.
          Hide
          Jaroslav Kostal added a comment -

          I can reproduce this problem on Grails 2.0.0, SSC 1.2.6, Resources 1.1.6, Windows 7 x64.
          It hapens only the first time I run 'grails run-app' (with empty target and project .grails dir).
          Declaring explicit dependency on webxml 1.4.1 in BuildConfig works for me too.

          Show
          Jaroslav Kostal added a comment - I can reproduce this problem on Grails 2.0.0, SSC 1.2.6, Resources 1.1.6, Windows 7 x64. It hapens only the first time I run 'grails run-app' (with empty target and project .grails dir). Declaring explicit dependency on webxml 1.4.1 in BuildConfig works for me too.
          Hide
          Christopher Florencia added a comment -

          Same error in Grails 2.0.4 ssc 1.2.7.3. works in 2nd comile

          Show
          Christopher Florencia added a comment - Same error in Grails 2.0.4 ssc 1.2.7.3. works in 2nd comile
          Hide
          Mathias Lin added a comment -

          I had this issue in Grails 2.2.0 when running the app via maven 'mvn grails:clean grails:run app', while 'grails run-app' alone worked ok, and resolved it as follows:

          If you're using Maven, make sure you have this on your pom.xml:

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

          and in BuildConfig,groovy:

          runtime ":webxml:1.4.1"

          That solved the issue for me with Grails 2.2.0.

          Show
          Mathias Lin added a comment - I had this issue in Grails 2.2.0 when running the app via maven 'mvn grails:clean grails:run app', while 'grails run-app' alone worked ok, and resolved it as follows: If you're using Maven, make sure you have this on your pom.xml: <dependency> <groupId>org.grails.plugins</groupId> <artifactId>webxml</artifactId> <version>1.4.1</version> <scope>runtime</scope> <type>zip</type> </dependency> and in BuildConfig,groovy: runtime ":webxml:1.4.1" That solved the issue for me with Grails 2.2.0.

            People

            • Assignee:
              Burt Beckwith
              Reporter:
              Bernhard Areich
            • Votes:
              10 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: