使用Spring Security初始化应用程序时出错:找不到net / sf / ehcache / Ehcache

时间:2014-06-15 12:43:18

标签: java spring grails acl ehcache

我想将Spring Security ACL plugin与mongodb一起使用。

当我运行我的应用时,我收到以下错误:

2014-06-15 14:08:04,325 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: net/sf/ehcache/Ehcache
Message: net/sf/ehcache/Ehcache
    Line | Method
->> 2451 | privateGetDeclaredMethods in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1810 | getDeclaredMethods        in     ''
|    334 | innerRun . . . . . . . .  in java.util.concurrent.FutureTask$Sync
|    166 | run                       in java.util.concurrent.FutureTask
|   1145 | runWorker . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
|    615 | run                       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . . . . . . in java.lang.Thread
Caused by ClassNotFoundException: net.sf.ehcache.Ehcache
->>  175 | findClass                 in org.codehaus.groovy.tools.RootLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    423 | loadClass                 in java.lang.ClassLoader
|    147 | loadClass . . . . . . . . in org.codehaus.groovy.tools.RootLoader
|    356 | loadClass                 in java.lang.ClassLoader
|   2451 | privateGetDeclaredMethods in java.lang.Class
|   1810 | getDeclaredMethods        in     ''
|    334 | innerRun . . . . . . . .  in java.util.concurrent.FutureTask$Sync
|    166 | run                       in java.util.concurrent.FutureTask
|   1145 | runWorker . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
|    615 | run                       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . . . . . . in java.lang.Thread

我该怎么办?

1 个答案:

答案 0 :(得分:1)

您在设置中缺少ehcache.jar,或者有几个,导致版本冲突。

您可以找到latest ehcache.jar on the Maven repository