org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition

StackOverflow https://stackoverflow.com/questions/21871853

  •  13-10-2022
  •  | 
  •  

Question

I am trying to setup a dynamic route, here https://github.com/vaneyck/testingCamel but it seems that i cant use Java fluent builder syntax to add throttling to the routes if I include routes in other routes.

If I add the throttle code to the routes in grails-app/routes the code works well, but this does not conform to the setup i am using in my code.

| Error 2014-02-19 08:01:33,743 [pool-7-thread-1] ERROR context.GrailsContextLoader  - Error executing bootstraps: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition
Message: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition
   Line | Method
->> 638 | addRouteDefinitions              in org.apache.camel.impl.DefaultCamelContext
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    13 | doCall                           in BootStrap$_closure1
|   300 | evaluateEnvironmentSpecificBlock in grails.util.Environment
|   293 | executeForEnvironment            in     ''
|   269 | executeForCurrentEnvironment . . in     ''
|   303 | innerRun                         in java.util.concurrent.FutureTask$Sync
|   138 | run . . . . . . . . . . . . . .  in java.util.concurrent.FutureTask
|   895 | runTask                          in java.util.concurrent.ThreadPoolExecutor$Worker
|   918 | run . . . . . . . . . . . . . .  in     ''
^   662 | run                              in java.lang.Thread

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top