grails-routing icon indicating copy to clipboard operation
grails-routing copied to clipboard

Routes not registering in camel context, application.routeClasses = []

Open raffian opened this issue 11 years ago • 3 comments

Tried to get this working in 2.3.8.

create-route doesn't work, so I added MyMessageRoute to grails-app/routes, but after starting app and sending test message, route is never triggered. Checked camelContext.getRoutes(), no routes registered! So I registered manually in BootStrap...

def init = { servletContext ->                
        def _camelCtx =
            grailsApplication.mainContext.getBean('camelContext')
        _camelCtx.addRoutes(new MyMessageRoute())

Now it works!

Looking at plugin file, appears route classes should auto register, but application.routeClasses is empty list just before routeClasses.each { routeClass ->, I suspect this is the problem, but how is routeClasses populated?

My BuildConfig

    dependencies {
        //for jms issue
        compile('org.springframework:spring-jms:3.2.6.RELEASE'){
            export = false
        }

        //from routing-jms, could not get that plugin to work, had to manually add dependencies
        runtime('commons-logging:commons-logging:1.1.1')
        runtime('org.apache.activemq:activemq-core:5.7.0')
        runtime('org.apache.activemq:activemq-camel:5.9.0')
        runtime('org.apache.activemq:activemq-pool:5.9.0')
        runtime('org.apache.camel:camel-jms:2.13.0') {
            excludes 'spring-aop', 'spring-beans', 'spring-core', 'spring-expression', 'spring-asm', 'spring-tx', 'spring-context'
        }
    }

    plugins {
        build ":tomcat:7.0.52.1"
        compile ":scaffolding:2.0.2"
        compile ":routing:1.3.2"
    } 

raffian avatar Aug 05 '14 02:08 raffian

Sorry, been overhalmed. I'll try to take a look if @padcom don't have time.

aahutsal avatar Aug 17 '14 08:08 aahutsal

great, thank you!

------ Original Message ------ From: "Arsen A. Gutsal" [email protected] To: "padcom/grails-routing" [email protected] Cc: "Raffi Basmajian" [email protected] Sent: 8/17/2014 4:42:01 AM Subject: Re: [grails-routing] Routes not registering in camel context, application.routeClasses =

Sorry, been overhalmed. I'll try to take a look if @padcom don't have time.

— Reply to this email directly or view it on GitHub.

raffian avatar Aug 17 '14 13:08 raffian

Raffi,

We're rethinking the project as a whole. We'll let everyone know publicly what the future will hold and how certain limitations of the technology will (or won't) be tackled.

Cheers, Matthias.

2014-08-17 15:40 GMT+02:00 Raffi Basmajian [email protected]:

great, thank you!

------ Original Message ------ From: "Arsen A. Gutsal" [email protected] To: "padcom/grails-routing" [email protected] Cc: "Raffi Basmajian" [email protected] Sent: 8/17/2014 4:42:01 AM Subject: Re: [grails-routing] Routes not registering in camel context, application.routeClasses =

Sorry, been overhalmed. I'll try to take a look if @padcom don't have time.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/padcom/grails-routing/issues/42#issuecomment-52422112 .

padcom avatar Aug 17 '14 22:08 padcom