首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行或配置带有异步邮件插件的grails应用程序时出错会引发异常。

运行或配置带有异步邮件插件的grails应用程序时出错会引发异常。
EN

Stack Overflow用户
提问于 2014-06-26 06:54:38
回答 3查看 523关注 0票数 0

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

在此之后,当我试图运行-app时,它通过以下异常失败。

代码语言:javascript
复制
| 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
代码语言:javascript
复制
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by 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?
->>  262 | run       in java.util.concurrent.FutureTask
代码语言:javascript
复制
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
| Error Forked Grails VM exited with error

如果我删除了buil-config.groovy应用程序中的编译“:异步邮件:1.0”,那么grailsVersion2.3.9或异步邮件插件有什么问题吗?

异步邮件插件中的特性似乎非常好,并希望使用它。

我正在使用下面的插件,它们也运行得很好

代码语言:javascript
复制
    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"

任何面临这个问题的人都请提前帮忙谢谢。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2014-06-27 13:19:07

插件文档说它迁移到了石英plugin.Also,它依赖于hibernate、石英和邮件插件。停止服务器,包括剩余的依赖项,然后刷新IDE中的依赖项,然后尝试清除grails。

暂时请删除电子邮件确认,刷新,清理,然后尝试这个插件分别配置它们。先使异步邮件正常工作,然后转到电子邮件确认。即在异步邮件后重新排序电子邮件-确认。

票数 0
EN

Stack Overflow用户

发布于 2014-06-26 08:05:18

在JDK上使用的是哪个版本?

尝试升级您的石英,邮件和弹簧安全核心插件。

代码语言:javascript
复制
compile ":quartz:1.0.2"
compile ":mail:1.0.5", {
    excludes 'spring-test'
}
compile ':spring-security-core:2.0-RC3'

清洁后重新启动您的grails插件。

票数 0
EN

Stack Overflow用户

发布于 2014-07-10 05:17:51

您只需排除邮件的依赖项和电子邮件确认的石英。

代码语言:javascript
复制
runtime ":email-confirmation:2.0.8" {
    excludes 'mail', 'quartz'
}

尝试使用最新版本候选:asynchronous-mail:1.1-RC1

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24424194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档