【发布时间】:2012-11-15 21:14:04
【问题描述】:
我正在尝试运行从另一个开发人员那里继承的 Grails 应用程序。它只有一个域类,我们称之为foopackage.DomainObject。当我编译它时,.class 文件出现在target/classes 中,正如我所期望的那样。但是,当我尝试 grails run-app 时,我得到了
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: Could not
initialize class foopackage.DomainObject
起初我认为这可能是因为 DomainObject 试图与损坏的静态初始化程序中不存在的数据库通信,所以我将其缩减为仅
package foopackage
class DomainObject {}
我仍然遇到同样的错误。也许有一些潜在的配置/GORM 问题,但它没有出现在--stacktrace 中。有什么提示吗?
【问题讨论】:
标签: grails noclassdeffounderror