Reputation: 25797
I've upgraded grails to 2.4.4 and using mongodb 3.0.2.
When I'm firing the app with run-app command it fails with following exception:
| Error 2014-11-06 15:13:18,026 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparator()Ljava/util/Comparator;
Message: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparator()Ljava/util/Comparator;
Line | Method
->> 131 | invokeMethod in grails.spring.DynamicElementReader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
| 584 | beans . . . . . . . . . . in ''
| 527 | invokeMethod in ''
| 262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
I tried debugging the problem and found that, I'd added latest gorm-release in my BuildConfig.groovy as
compile 'org.grails:grails-datastore-gorm:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.3.RELEASE'
test 'org.grails:grails-datastore-simple:3.1.3.RELEASE'
When I'm removing these dependencies from my BuildConfig.groovy file, app runs properly. But I need these latest dependencies. Any idea please?
Upvotes: 0
Views: 455
Reputation: 1
Grails 2.4.4 using spring 4.x bean version.
This problem arise when some of your external dependency uses spring 3.X To find which dependency adding spring 3.X jar run below command
grails dependency-report
Then Find the spring-beans-3.X jar and exclude this dependency in Build.groovy as below
compile com.sample.componenet.server.utilities:sample-logger:1.0.0 excludes org.springframework:spring-beans:3.2.8.RELEASE
Upvotes: 0
Reputation: 25797
Got the solution. The issue was with the grails-datastore-gorm dependency, which was pulling in an older version of spring-beans.
https://jira.grails.org/browse/GRAILS-11813
Upvotes: 0