Grails JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
Spring Security Core Plugin
  • Spring Security Core Plugin
  • GPSPRINGSECURITYCORE-156

Fails to deploy in production

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: Grails-Spring-Security-Core 1.2.7
  • Fix Version/s: Grails-Spring-Security-Core 1.2.7.1
  • Labels:
    • security
    • war
  • Environment:
    Mac OS 10.6.8, Tomcat 7.x

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
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    spring-test.zip
    17/Jan/12 9:40 AM
    187 kB
    Shailesh
    1. File
      spring-test/.classpath 0.7 kB
    2. File
      spring-test/.project 0.5 kB
    3. File
      spring-test/.../org.codehaus.groovy.eclipse.preferences.prefs 0.1 kB
    4. File
      spring-test/application.properties 0.2 kB
    5. File
      spring-test/grails-app/.../BootStrap.groovy 0.5 kB
    6. File
      spring-test/.../BuildConfig.groovy 1 kB
    7. File
      spring-test/grails-app/.../Config.groovy 4 kB
    8. File
      spring-test/grails-app/.../DataSource.groovy 0.8 kB
    9. File
      spring-test/grails-app/.../resources.groovy 0.0 kB
    10. File
      spring-test/.../UrlMappings.groovy 0.2 kB
    11. File
      spring-test/.../LoginController.groovy 4 kB
    12. File
      spring-test/.../LogoutController.groovy 0.3 kB
    13. File
      spring-test/grails-app/.../thed/Role.groovy 0.2 kB
    14. File
      spring-test/grails-app/.../thed/User.groovy 0.6 kB
    15. File
      spring-test/grails-app/.../UserRole.groovy 1 kB
    16. File
      spring-test/.../messages.properties 3 kB
    17. File
      spring-test/.../messages_da.properties 3 kB
    18. File
      spring-test/.../messages_de.properties 4 kB
    19. File
      spring-test/.../messages_es.properties 3 kB
    20. File
      spring-test/.../messages_fr.properties 2 kB
    21. File
      spring-test/.../messages_it.properties 2 kB
    22. File
      spring-test/.../messages_ja.properties 2 kB
    23. File
      spring-test/.../messages_nl.properties 3 kB
    24. File
      spring-test/.../messages_pt_BR.properties 3 kB
    25. File
      spring-test/.../messages_pt_PT.properties 3 kB
    26. File
      spring-test/.../messages_ru.properties 4 kB
    27. File
      spring-test/.../messages_th.properties 5 kB
    28. File
      spring-test/.../messages_zh_CN.properties 2 kB
    29. File
      spring-test/grails-app/views/error.gsp 2 kB
    30. File
      spring-test/grails-app/views/index.gsp 4 kB
    Showing 30 of 74 items Download Zip
    Show
    Zip Archive
    spring-test.zip
    17/Jan/12 9:40 AM
    187 kB
    Shailesh

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Peter Ledbrook added a comment - 18/Jan/12 3:22 AM

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 - 18/Jan/12 3:22 AM 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
Permalink
Shailesh added a comment - 18/Jan/12 8:00 AM

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 - 18/Jan/12 8:00 AM Downgrading to version 1.2.3 introduced http://jira.grails.org/browse/GPSPRINGSECURITYCORE-98 , workaround for which is to remove webxml plugin.
Hide
Permalink
Burt Beckwith added a comment - 18/Jan/12 12:08 PM

Fixed by https://github.com/grails-plugins/grails-spring-security-core/commit/6a4ac190e8b09e04a3dd026bbfb0b1d9b2a50327

Show
Burt Beckwith added a comment - 18/Jan/12 12:08 PM Fixed by https://github.com/grails-plugins/grails-spring-security-core/commit/6a4ac190e8b09e04a3dd026bbfb0b1d9b2a50327
Hide
Permalink
Burt Beckwith added a comment - 18/Jan/12 12:09 PM

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 - 18/Jan/12 12:09 PM 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
Permalink
Raviteja added a comment - 18/Jan/12 12:48 PM

is this somehow related to: GPWEBXML-5

Show
Raviteja added a comment - 18/Jan/12 12:48 PM is this somehow related to: GPWEBXML-5
Hide
Permalink
Burt Beckwith added a comment - 18/Jan/12 1:13 PM

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 - 18/Jan/12 1:13 PM 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
Permalink
Raviteja added a comment - 18/Jan/12 11:47 PM

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

Show
Raviteja added a comment - 18/Jan/12 11:47 PM You are right GPWEBXML-5 is a duplicate of this one.
Hide
Permalink
Reiner Saddey added a comment - 19/Jan/12 3:43 AM

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 - 19/Jan/12 3:43 AM 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
Vote (0)
Watch (3)

Dates

  • Created:
    17/Jan/12 9:40 AM
    Updated:
    19/Jan/12 3:43 AM
    Resolved:
    18/Jan/12 12:08 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.2.1#813-sha1:277a546)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Grails project. Try JIRA - bug tracking software for your team.