Routes not registering in camel context, application.routeClasses = []
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"
}
Sorry, been overhalmed. I'll try to take a look if @padcom don't have time.
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.
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 .