padcom / grails-routing

Apache License 2.0
30 stars 31 forks source link

Problems sending message under Eclipse #23

Open yellek opened 11 years ago

yellek commented 11 years ago

When I run the code:

class ParseMailService {

def parseMail(mailText) {

    def mailMessage = [body : mailText]
    sendMessage("seda:input.queue", mailMessage)

}

}

I get the error:

caught: groovy.lang.MissingMethodException: No signature of method: topicmail.ParseMailService.sendMessage() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: [seda:input.queue, [body:...]]

Environment:

Eclipse 4.2.1 Grails IDE 3.1.0 Grails Plugins: cache: 1.0.1 database-migration: 1.2.1 hibernate: 2.2.0 jquery: 1.8.3 resources: 1.1.6 routing: 1.2.2 tomcat: 2.2.0 webxml: 1.4.1

rowlandwatkins commented 11 years ago

Hi Yellek,

Looks like your not getting the CamelContext injected into your ParseMailService - does ParseMailService live in grails-app/services, or somewhere else?

Cheers,

Rowland

JarredOlson commented 10 years ago

I get this as well in a Controller and Service that is under grails-app/controllers /grails-app/services directory using 2 different versions of Grails.

grails 2.3.5/2.2.2 routing 1.2.9 routing-jms 1.2.0

If you have any insight into this it would be extremely helpful.