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

标签 grails grails-2.0

我正在尝试运行grails应用程序,但出现以下异常

严重:异常将上下文初始化事件发送到类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类,异常(exception)是域类。
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'

     }


}

最佳答案

我在Grails 2.2.0应用程序中遇到了java.lang.VerifyError,这是因为GSP文件中的Groovy表达式被注释掉了,这显然使Grails缓存机制中断了。删除注释掉的表达式可解决此问题。

关于grails - GRAILS 2.0异常:-java.lang.VerifyError:(class:xls/Recruitment,方法:initErrors signature:()V)无法将操作数从空堆栈中弹出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11594507/

相关文章:

spring - 何时使用 Searchable 进行查询,何时使用 Hibernate?

maven - Grails 2.2.x - 使用多个自定义存储库的依赖关系解析

java - Grails,Spring Security LDAP 插件

ajax - Grails ajax 功能

mongodb - 如何在grails 2.4.4中使用mongodb?

spring - 是否可以获得所有事件 session 的列表?

servlets - 注释掉grails 2.4项目的web.xml中异步支持的影响是什么?

json - JSON 的 Grails 2.4 命名配置不起作用

grails - 在grails中使用HTTP GET调用时,字段值呈现为空

grails - Grails动态显示实现(部分页面更新)