Details

      Description

      Create a new grails project.
      Install latest version of plugin.
      Run s2-quickstart and create User, Role, User classes
      Add code to BootStrap to create user and password
      Run app using grails run-app
      Verify it works by logging in

      Now create a war using grails war
      deploy war to a tomcat server
      Deployment fails with following exception

      2012-01-17 09:19:59,858 [main] ERROR context.ContextLoader  - Context initialization failed
      org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static com.thed.Role.findByAuthority() is applicable for argument types: (java.lang.String) values: [ROLE_ADMIN]
      	at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:87)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4780)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:557)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:987)
      	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:540)
      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
      	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:313)
      	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:293)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:996)
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:771)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:988)
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:427)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:585)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
      Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static com.thed.Role.findByAuthority() is applicable for argument types: (java.lang.String) values: [ROLE_ADMIN]
      	at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:251)
      	at grails.util.Environment.executeForEnvironment(Environment.java:244)
      	at grails.util.Environment.executeForCurrentEnvironment(Environment.java:220)
      Caused by: groovy.lang.MissingMethodException: No signature of method: static com.thed.Role.findByAuthority() is applicable for argument types: (java.lang.String) values: [ROLE_ADMIN]
      	at BootStrap$_closure1.doCall(BootStrap.groovy:8)
      	... 3 more
      

        Activity

        Hide
        Peter Ledbrook added a comment -

        I've confirmed this is a problem with Grails 1.3.7 and Spring Security Core 1.2.7. Version 1.2.3 of the plugin seems to be fine. Also, using 1.2.7 with Grails 2.0 also seems to work.

        Show
        Peter Ledbrook added a comment - I've confirmed this is a problem with Grails 1.3.7 and Spring Security Core 1.2.7. Version 1.2.3 of the plugin seems to be fine. Also, using 1.2.7 with Grails 2.0 also seems to work.
        Hide
        Shailesh added a comment -

        Downgrading to version 1.2.3 introduced http://jira.grails.org/browse/GPSPRINGSECURITYCORE-98, workaround for which is to remove webxml plugin.

        Show
        Shailesh added a comment - Downgrading to version 1.2.3 introduced http://jira.grails.org/browse/GPSPRINGSECURITYCORE-98 , workaround for which is to remove webxml plugin.
        Show
        Burt Beckwith added a comment - Fixed by https://github.com/grails-plugins/grails-spring-security-core/commit/6a4ac190e8b09e04a3dd026bbfb0b1d9b2a50327
        Hide
        Burt Beckwith added a comment -

        Shailesh - downgrading to 1.2.6 would have been fine. It's not the webxml plugin, it's a problem in the dependencies in the 1.2.7 release. But v1.2.7.1 fixes that.

        Show
        Burt Beckwith added a comment - Shailesh - downgrading to 1.2.6 would have been fine. It's not the webxml plugin, it's a problem in the dependencies in the 1.2.7 release. But v1.2.7.1 fixes that.
        Hide
        Raviteja added a comment -

        is this somehow related to: GPWEBXML-5

        Show
        Raviteja added a comment - is this somehow related to: GPWEBXML-5
        Hide
        Burt Beckwith added a comment -

        Ravi - as I said this was a Hibernate dependency issue, not webxml-related. But GPWEBXML-5 might be unrelated to web.xml and caused by this issue - could you test with v1.2.7.1?

        Show
        Burt Beckwith added a comment - Ravi - as I said this was a Hibernate dependency issue, not webxml-related. But GPWEBXML-5 might be unrelated to web.xml and caused by this issue - could you test with v1.2.7.1?
        Hide
        Raviteja added a comment -

        You are right GPWEBXML-5 is a duplicate of this one.

        Show
        Raviteja added a comment - You are right GPWEBXML-5 is a duplicate of this one.
        Hide
        Reiner Saddey added a comment -

        Great news!

        I suspect GPSPRINGSECURITYCORE-155 (Unable to access sessionFactory in plugin (No bean named 'sessionFactory' is defined)) duplicates this issue and might be marked as such and having been resolved in 1.2.7.1

        Show
        Reiner Saddey added a comment - Great news! I suspect GPSPRINGSECURITYCORE-155 (Unable to access sessionFactory in plugin (No bean named 'sessionFactory' is defined)) duplicates this issue and might be marked as such and having been resolved in 1.2.7.1

          People

          • Assignee:
            Burt Beckwith
            Reporter:
            Shailesh
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: