Ever since about a week ago after doing a prod dbm-update I started getting this error when deploying the WAR-file to EB (run-app works fine both in dev and prod setting):
Caused by: org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following: 1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary 2. Shutdown the earlier cacheManager before creating new one with same name.
Grails 2.5.0 release notes suggested setting beans.cacheManager.shared to true. Didn't help.
Other people facing similar issues suggested replacing Hibernate cache factory_class from org.hibernate.cache.ehcache.EhCacheRegionFactory to org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory - this post. I think it eliminated the unnamed cacheManager issue, but created another one:
Caused by: java.io.FileNotFoundException: class path resource [db/changelog/db.changelog-master.yaml] cannot be resolved to URL because it does not exist
Setting "liquibase.checkChangeLogLocation = false" and "liquibase.enabled = false" triggers yet another:
Caused by: org.grails.core.exceptions.GrailsConfigurationException: Error configuring dynamic methods for plugin [springSecurityCore:3.0.4]: null
I'm using: Grails 3.1.4 with the AngularJS profile, Spring Security 3.0.4, Spring Security Rest 2.0.0.M2, Database Migration 2.0.0.RC4
I've also tried:
- switching to Spring Security 3.0.2, 3.0.3
- termimating the EC2 instance
- re-building the entire EB environment and creating a new database
- setting hibernate use_second_level_cache to false
- downgrading to Grails 3.1.0
- setting sourceSets { main { resources { srcDir 'grails-app/migrations'}}}
I'm running out of ideas and nothing has helped so far. Does anyone have an idea? Or is facing similar problems?