有一个 Grails 2 应用程序并执行 run-app 工作正常,run-war 失败:
2011-12-24 12:43:40,996 [Thread-2] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Lgrails/test/mixin/services/ServiceUnitTestMixin;
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: Lgrails/test/mixin/services/ServiceUnitTestMixin;
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredField(Class.java:1880)
... 5 more
Caused by: java.lang.ClassNotFoundException: grails.test.mixin.services.ServiceUnitTestMixin
... 7 more
在使用 Grails 2 获得了非常完美的体验之后,遇到了这个问题,
这是如何发生的,这对我来说是一个完整的头颅:
java.lang.NoClassDefFoundError: Lgrails/test/mixin/services/ServiceUnitTestMixin;
...任何反馈将不胜感激。