Details
Description
If I kick off the example app with 'grails-debug run-app' I get:
| Running Grails application Configuring Spring Security ... Configuring Spring Security OpenID ... | Error 2011-11-02 17:52:55,516 [Thread-9] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'openIDAuthenticationFilter': Initialization of bean failed; nested exception is java.lang.ClassCircularityError: org/springframework/beans/TypeMismatchException Line | Method ->> 527 | doCreateBean in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 580 | preInstantiateSingletons in org.springframework.beans.factory.support.DefaultListableBeanFactory | 913 | finishBeanFactoryInitialization in org.springframework.context.support.AbstractApplicationContext | 464 | refresh in '' | 153 | getApplicationContext . . . . . in org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration | 168 | configure in org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator | 127 | configure . . . . . . . . . . . in '' | 120 | configureWebApplicationContext in org.codehaus.groovy.grails.web.context.GrailsConfigUtils | 103 | initWebApplicationContext . . . in org.codehaus.groovy.grails.web.context.GrailsContextLoader | 111 | contextInitialized in org.springframework.web.context.ContextLoaderListener | 4723 | listenerStart . . . . . . . . . in org.apache.catalina.core.StandardContext | 5226 | call in org.apache.catalina.core.StandardContext$1 | 5221 | call . . . . . . . . . . . . . in '' | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . . . . . . . . . . . . in '' ^ 680 | run in java.lang.Thread Caused by ClassCircularityError: org/springframework/beans/TypeMismatchException ->> 686 | createArgumentArray in org.springframework.beans.factory.support.ConstructorResolver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 196 | autowireConstructor in '' | 1003 | autowireConstructor . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 907 | createBeanInstance in '' | 485 | doCreateBean . . . . . . . . . in '' | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 322 | resolveReference in org.springframework.beans.factory.support.BeanDefinitionValueResolver | 106 | resolveValueIfNecessary . . . . in '' | 630 | resolveConstructorArguments in org.springframework.beans.factory.support.ConstructorResolver | 148 | autowireConstructor . . . . . . in '' | 1003 | autowireConstructor in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 907 | createBeanInstance . . . . . . in '' | 485 | doCreateBean in '' | 118 | doCreateBean . . . . . . . . . in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject . . . . . . . . . . . in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean . . . . . . . . . . . in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean in '' | 322 | resolveReference . . . . . . . in org.springframework.beans.factory.support.BeanDefinitionValueResolver | 106 | resolveValueIfNecessary in '' | 1325 | applyPropertyValues . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 1086 | populateBean in '' | 517 | doCreateBean . . . . . . . . . in '' | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 580 | preInstantiateSingletons in org.springframework.beans.factory.support.DefaultListableBeanFactory | 913 | finishBeanFactoryInitialization in org.springframework.context.support.AbstractApplicationContext | 464 | refresh in '' | 153 | getApplicationContext . . . . . in org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration | 168 | configure in org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator | 127 | configure . . . . . . . . . . . in '' | 120 | configureWebApplicationContext in org.codehaus.groovy.grails.web.context.GrailsConfigUtils | 103 | initWebApplicationContext . . . in org.codehaus.groovy.grails.web.context.GrailsContextLoader | 111 | contextInitialized in org.springframework.web.context.ContextLoaderListener | 4723 | listenerStart . . . . . . . . . in org.apache.catalina.core.StandardContext | 5226 | call in org.apache.catalina.core.StandardContext$1 | 5221 | call . . . . . . . . . . . . . in '' | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . . . . . . . . . . . . in '' ^ 680 | run in java.lang.Thread | Error 2011-11-02 17:52:55,616 [Thread-9] ERROR [localhost].[/openidtest] - Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener Line | Method ->> 527 | doCreateBean in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 580 | preInstantiateSingletons in org.springframework.beans.factory.support.DefaultListableBeanFactory | 913 | finishBeanFactoryInitialization in org.springframework.context.support.AbstractApplicationContext | 464 | refresh in '' | 153 | getApplicationContext . . . . . in org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration | 168 | configure in org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator | 127 | configure . . . . . . . . . . . in '' | 120 | configureWebApplicationContext in org.codehaus.groovy.grails.web.context.GrailsConfigUtils | 103 | initWebApplicationContext . . . in org.codehaus.groovy.grails.web.context.GrailsContextLoader | 111 | contextInitialized in org.springframework.web.context.ContextLoaderListener | 4723 | listenerStart . . . . . . . . . in org.apache.catalina.core.StandardContext | 5226 | call in org.apache.catalina.core.StandardContext$1 | 5221 | call . . . . . . . . . . . . . in '' | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . . . . . . . . . . . . in '' ^ 680 | run in java.lang.Thread Caused by ClassCircularityError: org/springframework/beans/TypeMismatchException ->> 686 | createArgumentArray in org.springframework.beans.factory.support.ConstructorResolver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 196 | autowireConstructor in '' | 1003 | autowireConstructor . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 907 | createBeanInstance in '' | 485 | doCreateBean . . . . . . . . . in '' | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 322 | resolveReference in org.springframework.beans.factory.support.BeanDefinitionValueResolver | 106 | resolveValueIfNecessary . . . . in '' | 630 | resolveConstructorArguments in org.springframework.beans.factory.support.ConstructorResolver | 148 | autowireConstructor . . . . . . in '' | 1003 | autowireConstructor in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 907 | createBeanInstance . . . . . . in '' | 485 | doCreateBean in '' | 118 | doCreateBean . . . . . . . . . in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject . . . . . . . . . . . in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean . . . . . . . . . . . in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean in '' | 322 | resolveReference . . . . . . . in org.springframework.beans.factory.support.BeanDefinitionValueResolver | 106 | resolveValueIfNecessary in '' | 1325 | applyPropertyValues . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 1086 | populateBean in '' | 517 | doCreateBean . . . . . . . . . in '' | 118 | doCreateBean in org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory | 456 | createBean . . . . . . . . . . in org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory | 295 | getObject in org.springframework.beans.factory.support.AbstractBeanFactory$1 | 225 | getSingleton . . . . . . . . . in org.springframework.beans.factory.support.DefaultSingletonBeanRegistry | 292 | doGetBean in org.springframework.beans.factory.support.AbstractBeanFactory | 194 | getBean . . . . . . . . . . . . in '' | 580 | preInstantiateSingletons in org.springframework.beans.factory.support.DefaultListableBeanFactory | 913 | finishBeanFactoryInitialization in org.springframework.context.support.AbstractApplicationContext | 464 | refresh in '' | 153 | getApplicationContext . . . . . in org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration | 168 | configure in org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator | 127 | configure . . . . . . . . . . . in '' | 120 | configureWebApplicationContext in org.codehaus.groovy.grails.web.context.GrailsConfigUtils | 103 | initWebApplicationContext . . . in org.codehaus.groovy.grails.web.context.GrailsContextLoader | 111 | contextInitialized in org.springframework.web.context.ContextLoaderListener | 4723 | listenerStart . . . . . . . . . in org.apache.catalina.core.StandardContext | 5226 | call in org.apache.catalina.core.StandardContext$1 | 5221 | call . . . . . . . . . . . . . in '' | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . . . . . . . . . . . . in '' ^ 680 | run in java.lang.Thread | Error 2011-11-02 17:52:55,630 [main] ERROR core.StandardContext - Error listenerStart | Error 2011-11-02 17:52:55,635 [main] ERROR core.StandardContext - Context [/openidtest] startup failed due to previous errors | Server running. Browse to http://localhost:8080/openidtest | Application loaded in interactive mode. Type 'exit' to shutdown. | Enter a script name to run. Use TAB for completion: grails>
I had the same problem when I followed the tutorial on http://burtbeckwith.github.com/grails-spring-security-openid/docs/manual/index.html
I happen to find more error information when the application was running in console: "ERROR context.GrailsContextLoader - Error executing bootstraps: No such property: password for class: BootStrap"
And the reason was in BoolStrap.groovy, a pair of quot was missing around password after the colon
def user = new User(username: 'user', password: password, enabled: true).save()
def admin = new User(username: 'admin', password: password, enabled: true).save()
change it to:
def user = new User(username: 'user', password: 'password', enabled: true).save()
def admin = new User(username: 'admin', password: 'password', enabled: true).save()