Erik Sapir
Erik Sapir

Reputation: 24747

Grails app fails to start with creation of bean error

I am migrating my grails project from GGTS to Intellij IDEA 14 and my grails app fails to start. I receive the following error:

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

How can i fix this issue?

Upvotes: 1

Views: 1300

Answers (1)

biniam
biniam

Reputation: 8199

Make sure forked mode is enabled in Grails BuildConfig.groovy.

Upvotes: 4

Related Questions