MissingMethodException in Grails Bootstrap on Tomcat

872 views Asked by At

after updating my grails app's security plugins, i get the following error when deploying to tomcat:

2012-01-17 09:13:04,970 [pool-2-thread-1] 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 org.example.SecRole.findByAuthority() is applicable for argument types: (java.lang.String) values: [ROLE_USER]

the app works fine when being tested via run-app.

the SecRole class has been automatically generated by the spring security plugin.

i had previously deployed the app on the same server without a problem when using an older version of the spring security plugin.

have been knocking my head against this for hours. ideas much appreciated.

4

There are 4 answers

0
ilyashev On BEST ANSWER

As per Peter's comment above, upgrading to Grails 2.0 solved the problem I described above. However, I had subsequently run into a host of upgrade issues with the app.

1
limcheekin On

Are you using your own Spring Security's User and Role class?

Did you tried to create a fresh grails project and install it with vacation request sample app to test it out?

Lastly, may I know which Grails version and OS you use?

Cheers,

Chee Kin

6
shailesh mangal On

My prod Env: Tomcat 7, Fedora, Grails 1.3.7, activiti-spring-security 0.4.6, spring-security-core 1.2.7 activiti 5.8.2

Dev Env: Mac OS 10.6, Grails 1.3.7, activiti-spring-security 0.4.6, spring-security-core 1.2.7, activiti 5.8.2

I have installed vacation request app on fresh grails project and that works fine when I run using grails run-app (both in dev and prod mode).

0
Burt Beckwith On

This is a bug in v1.2.7 of the plugin. I released v1.2.7.1 to fix it; you can also downgrade to v1.2.6.