简体   繁体   中英

Grails 2.4 throws EHCache class not found error

I created a fresh Grails 2.4 project, removed hibernate and database migration plugin added latest spring security and mongo db plugin and when I ran grails compile I got following error

| Error Fatal error during compilation java.lang.NoClassDefFoundError: net/sf/ehcache/config/CacheConfiguration (Use --stacktrace to see the full trace)

If I remove spring security plugin it compiles and if I remove mongoDB plugin and use spring-security with hibernate it still works only the combination of spring security with solo mongoDB plugin is giving above error.

Any Idea ?

Looks like spring-security depends on ehcache, but doesn't declare as such. We had a similar problem with the cache plugin depending on ehcache. Add this to the dependencies section of your BuildConfig:

compile "net.sf.ehcache:ehcache-core:2.4.8"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM