0

i want to integrated grails asynchronous-mail:1.0 plugin to my app for that i have added following to my build config compile ":asynchronous-mail:1.0"

after that as i tried to run-app which fails by following exceptions

| 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

|   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

|   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

if i remove compile ":asynchronous-mail:1.0" from build-config.groovy application runs well is there any trouble with grails version 2.3.9 or with asynchronous-mail plugin

features in asynchronous-mail plugin are seems to realy good and want to use it

i am using following plugin also they are working fine

    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"

Anybody who is facing this problem please help thanks in advance

Madan Sen
  • 143
  • 1
  • 1
  • 7
  • [plugin docs](http://grails.org/plugin/asynchronous-mail) say it was migrated to the quartz plugin.Also it depends on hibernate, quartz and mail plugins. Stop server, include remaining dependencies, then refresh your dependencies from IDE then try by doing grails clean. – Swapnil Sawant Jun 26 '14 at 08:09
  • hi swapnil i am using email-confirmation also which in turns depends on quartz plugin and mail do i need to config them separately too? – Madan Sen Jun 26 '14 at 09:26
  • For time being please remove email-confirmation, refresh, clean and then try this plugins configuring them separately. Make this work first and then go to email-confirmation. – Swapnil Sawant Jun 26 '14 at 09:42
  • hi Swapnil thanks reordering email-confirmation after asynchronous one and then refresh dependencies had worked for me. – Madan Sen Jun 27 '14 at 09:26
  • I am glad that it worked for you. so I will post it as an answer for you to accept as further readers will benefit from it. – Swapnil Sawant Jun 27 '14 at 13:15

3 Answers3

0

Which version on JDK you are using?

Try upgrading your quartz, mail & spring security core plugin.

compile ":quartz:1.0.2"
compile ":mail:1.0.5", {
    excludes 'spring-test'
}
compile ':spring-security-core:2.0-RC3'

Restart your grails plugin after clean.

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
  • hi thanks for quick reply i am usingquartz, mail & spring security core plugin are all upto their latest version and as per JDK i am using oracle jdk7 – Madan Sen Jun 26 '14 at 08:53
  • Okay, after looking at your buildconfig (posted in the issue), I thought, you were using an older version of those 3 plugins. I'll get back to you for this. – Shashank Agrawal Jun 26 '14 at 10:44
0

plugin docs say it was migrated to the quartz plugin.Also it depends on hibernate, quartz and mail plugins. Stop server, include remaining dependencies, then refresh your dependencies from IDE then try by doing grails clean.

For time being please remove email-confirmation, refresh, clean and then try this plugins configuring them separately. Make asynchronous-mail work first and then go to email-confirmation. i.e. reordering email-confirmation after asynchronous one.

Swapnil Sawant
  • 620
  • 8
  • 21
0

You can just exclude dependencies on mail and quartz of email-confirmation

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

Try to use latest Release Candidate :asynchronous-mail:1.1-RC1.