Spring 使用异步邮件插件运行或配置grails应用程序时出错引发异常

Spring 使用异步邮件插件运行或配置grails应用程序时出错引发异常,spring,email,grails,asynchronous,grails-2.3,Spring,Email,Grails,Asynchronous,Grails 2.3,我想将grails异步邮件:1.0插件集成到我的应用程序中,因为我在构建配置中添加了以下内容 编译:异步邮件:1.0“ 之后,当我尝试运行应用程序时,由于以下异常而失败 | Error 2014-06-26 11:49:55,958 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'nonAs

我想将grails异步邮件:1.0插件集成到我的应用程序中,因为我在构建配置中添加了以下内容 编译:异步邮件:1.0“

之后,当我尝试运行应用程序时,由于以下异常而失败

| Error 2014-06-26 11:49:55,958 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: Error creating bean with name 'nonAsynchronousMailService': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'grailsApplication' of bean class [grails.plugin.mail.MailService]: Bean property 'grailsApplication' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Message: Error creating bean with name 'nonAsynchronousMailService': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'grailsApplication' of bean class [grails.plugin.mail.MailService]: Bean property 'grailsApplication' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Line | Method
->>  262 | run       in java.util.concurrent.FutureTask


如果我删除 编译“:异步邮件:1.0” 来自build-config.groovy 应用程序运行良好 grails 2.3.9版或异步邮件插件有什么问题吗

异步邮件插件中的功能似乎非常好,希望使用它

我使用以下插件,他们也工作良好

    build ":tomcat:7.0.53"
    // plugins for the compile step
    compile ":scaffolding:2.0.3"
    compile ':cache:1.1.2'         
    runtime ":hibernate:3.6.10.15" // or ":hibernate4:4.3.5.2"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.8.3"
    runtime ":resources:1.2.8"     

    compile ':cache:1.0.1'
    compile ':spring-security-core:2.0-RC2'
    runtime ":email-confirmation:2.0.8"

    provided ":codenarc:0.21"

    compile (":postgresql-extensions:0.9.0") {
        excludes "hibernate"
    }

    compile ":browser-detection:0.4.3"
任何面临这个问题的人都请帮助
提前感谢

您使用的是JDK上的哪个版本

尝试升级您的quartz、mail&spring安全核心插件

compile ":quartz:1.0.2"
compile ":mail:1.0.5", {
    excludes 'spring-test'
}
compile ':spring-security-core:2.0-RC3'
清理后重新启动grails插件。

说它已迁移到quartz插件。它还依赖于hibernate、quartz和mail插件。停止服务器,包括剩余的依赖项,然后从IDE刷新依赖项,然后尝试执行grails清理


暂时请删除电子邮件确认,刷新,清理,然后尝试这个插件分别配置它们。首先让异步邮件工作,然后转到电子邮件确认。
i、 e.在异步确认之后重新排序电子邮件确认。

您只需排除对邮件和电子邮件确认的依赖即可

runtime ":email-confirmation:2.0.8" {
    excludes 'mail', 'quartz'
}

尝试使用最新的候选版本
:异步邮件:1.1-RC1

说它已迁移到quartz插件。它还依赖于hibernate、quartz和mail插件。停止服务器,包括剩余的依赖项,然后从IDE刷新依赖项,然后尝试执行grails clean.hi swapnil我也在使用电子邮件确认,这取决于quartz插件和邮件我是否需要单独配置它们?暂时请删除电子邮件确认,刷新,清理这些插件,然后尝试分别配置它们。首先完成这项工作,然后转到电子邮件确认。您好,Swapnil感谢在异步确认之后重新排序电子邮件确认,然后刷新依赖项。我很高兴它对您有效。因此,我将把它作为一个答案发布给您,让您接受,因为更多的读者将从中受益。您好,感谢您的快速回复,我使用的是Quartz,mail&spring安全核心插件都是最新版本,根据JDK,我使用的是oracle JDK7。好的,在查看了您的buildconfig(发布在本期中)之后,我想,您使用的是这3个插件的旧版本。我会给你回复的。插件不需要包含额外的依赖项。它包含了所有这些。
compile ":quartz:1.0.2"
compile ":mail:1.0.5", {
    excludes 'spring-test'
}
compile ':spring-security-core:2.0-RC3'
runtime ":email-confirmation:2.0.8" {
    excludes 'mail', 'quartz'
}