Grails应用程序无法以创建bean错误开始

时间:2015-08-06 06:07:15

标签: grails intellij-idea

我正在将我的Grails项目从GGTS迁移到Intellij IDEA 14,我的grails应用程序无法启动。我收到以下错误:

Error 2015-08-05 22:59:52,343 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
Message: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
    Line | Method
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
| Error 2015-08-05 22:59:52,376 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing Grails: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
Message: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
    Line | Method
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
| Error 2015-08-05 22:59:52,379 [localhost-startStop-1] ERROR [localhost].[/]  - Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
Message: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
    Line | Method
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Caused by NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
| Error 2015-08-05 22:59:52,384 [localhost-startStop-1] ERROR core.StandardContext  - Error listenerStart
| Error 2015-08-05 22:59:52,465 [localhost-startStop-1] ERROR core.StandardContext  - Context [] startup failed due to previous errors

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:4)

确保在Grails BuildConfig.groovy中分叉模式 启用