Cloud Foundry Plugin
  1. Cloud Foundry Plugin
  2. GPCLOUDFOUNDRY-32

App doesn't run with spring-security-core:1.2.7.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Grails-Cloud-Foundry 1.2.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Mac OS 10.7

      Description

      The Grails application does not start correctly with the latest spring-security-core plugin (1.2.7.1). While it's working fine with a "run-app" in dev mode an deployment to cloudfoundry.com results in following error:

      Class
      .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.

      Latest spring-security-core and resources plugin where used:

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

      As discussed on the mailling list the last compatible spring-security-core plugin is v1.2.4. After downgrading to this version is also working on cloudfoundry.com

      http://grails.1312388.n4.nabble.com/Problem-with-Cloud-Foundry-Plugin-tp4299226p4316053.html

        Activity

        Hide
        David Trattnig added a comment -

        Similar or duplicate of GRAILS-8501

        Show
        David Trattnig added a comment - Similar or duplicate of GRAILS-8501
        Hide
        Burt Beckwith added a comment -

        This is due to Cloud Foundry rewriting web.xml and changing the order of the filters and I've raised an issue there. If you use Requestmap or InterceptUrlMap mode it will work since the filter issue only affects annotation mode.

        Show
        Burt Beckwith added a comment - This is due to Cloud Foundry rewriting web.xml and changing the order of the filters and I've raised an issue there. If you use Requestmap or InterceptUrlMap mode it will work since the filter issue only affects annotation mode.
        Hide
        David Trattnig added a comment -

        Yes, I'm using annotation mode only.

        Show
        David Trattnig added a comment - Yes, I'm using annotation mode only.
        Hide
        zyro added a comment -

        i found the suggestion to require webxml plugin in buildconfig.groovy: http://support.cloudfoundry.com/entries/21014643-grails-spring-security-deployment-problem ...
        seems not to work in my case.
        was the root cause plugin-resolution or web.xml-rewriting? my main problem at the moment is that all logs only show "SEVERE: Error listenerStart" without further information what went wrong.

        Show
        zyro added a comment - i found the suggestion to require webxml plugin in buildconfig.groovy: http://support.cloudfoundry.com/entries/21014643-grails-spring-security-deployment-problem ... seems not to work in my case. was the root cause plugin-resolution or web.xml-rewriting? my main problem at the moment is that all logs only show "SEVERE: Error listenerStart" without further information what went wrong.
        Hide
        Peter Ledbrook added a comment -

        Burt, is there a Cloud Foundry issue that we can track?

        Show
        Peter Ledbrook added a comment - Burt, is there a Cloud Foundry issue that we can track?
        Hide
        Burt Beckwith added a comment -

        The fix is to add an explicit dependency on the webxml plugin in BuildConfig.groovy:

        compile ':webxml:1.4.1'
        

        I've updated the docs with this information

        Show
        Burt Beckwith added a comment - The fix is to add an explicit dependency on the webxml plugin in BuildConfig.groovy: compile ':webxml:1.4.1' I've updated the docs with this information

          People

          • Assignee:
            Burt Beckwith
            Reporter:
            David Trattnig
          • Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: