GRAILS 2.0异常: - java.lang.VerifyError :(类:xls / Recruitment,方法:initErrors签名:()V)无法从空堆栈中弹出操作数

时间:2012-07-21 17:46:40

标签: grails grails-2.0

我正在尝试运行grails应用程序,并且我得到了以下异常

SEVERE:将上下文初始化事件发送到类org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener

的侦听器实例的异常
**org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.VerifyError: (class: xls/Recruitment, method: initErrors signature: ()V) Unable to pop operand off an empty stack**

    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.VerifyError: (class: xls/Recruitment, method: initErrors signature: ()V) Unable to pop operand off an empty stack**

    at java.lang.Class.forName(Class.java:247)
    ... 5 more

我使用的是grails 2.0,异常中提到的Recruitment类是域类。

package xls

class Recruitment implements Serializable {

    String id
    String position
    String candidateName
    String noticePeriod
    String hrAgencyName
    String cellPhone
    String profileSourcingData
    String totalWorkExperience
    String emailAddress
    String currentCTC
    String expectedCTC
    String currentPosition
    String currentOrganisationName
    String communication
    String bankingOrFinancialDomainKnowledge
    String clientManagementExperience
    String reasonForChange
    String firstInterviewBy
    String secondInterviewBy
    String interviewStatus
    String offerDate
    String expectedDateOfJoining
    String joiningTeamName

    static constraints = {
         position(blank:true, nullable:true)
         candidateName(blank:true, nullable:true)
         noticePeriod(blank:true, nullable:true)
         hrAgencyName(blank:true, nullable:true)
         cellPhone(blank:true, nullable:true)
         profileSourcingData(blank:true, nullable:true)
         emailAddress(blank:true, nullable:true)
         totalWorkExperience(blank:true, nullable:true)
         currentCTC(blank:true, nullable:true)
         expectedCTC(blank:true, nullable:true)
         currentPosition(blank:true, nullable:true)
         currentOrganisationName(blank:true, nullable:true)
         communication(blank:true, nullable:true)
         bankingOrFinancialDomainKnowledge(blank:true, nullable:true)
         clientManagementExperience(blank:true, nullable:true)
         reasonForChange(blank:true, nullable:true)
         firstInterviewBy(blank:true, nullable:true)
         secondInterviewBy(blank:true, nullable:true)
         interviewStatus(blank:true, nullable:true)
         offerDate(blank:true, nullable:true)
         expectedDateOfJoining(blank:true, nullable:true)
         joiningTeamName(blank:true, nullable:true)
    }


    static mapping = {
            id generator:'assigned'

     }


}

2 个答案:

答案 0 :(得分:3)

我在Grails 2.2.0应用程序中得到了一个java.lang.VerifyError,因为GSP文件中有一个注释掉的Groovy表达式,显然使Grails缓存机制中断。删除注释掉的表达式修复了问题。

答案 1 :(得分:2)

请检查编译和部署jar之间的版本冲突,尤其是groovy-all.jar