camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remco Schoen <>
Subject Re: Groovy DSL - expression closures
Date Wed, 23 Aug 2017 11:23:19 GMT

I understand :)

Maybe an idea to mention on that page, that it is deprecated.


Met vriendelijke groet,

Remco Schoen

Op 23 aug. 2017, om 07:33 heeft Claus Ibsen <<>>
het volgende geschreven:


The groovy DSL is deprecated and its not recommended to be used. We
have also deprecated Scala DSL as well.

Sorry but there is only as few we can maintain which is Java and XML.

On Tue, Aug 15, 2017 at 2:26 PM, Remco Schoen <<>>

I’m trying to get processor closures to work as described on:

But when I put the code below in a groovy file, it gives an error.

Should this work?

Kind regards,

Remco Schoen

The error:

groovy.lang.MissingMethodException: No signature of method: simpletest$1$_configure_closure1.doCall()
is applicable for argument types: (org.apache.camel.impl.DefaultExchange, java.lang.Class)
values: , ...]
Possible solutions: doCall(), doCall(java.lang.Object), findAll(), findAll()
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(
at groovy.lang.MetaClassImpl.invokeMethod(
at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(
at org.codehaus.groovy.runtime.ConversionHandler.invoke(
at com.sun.proxy.$Proxy11.evaluate(Unknown Source)
at org.apache.camel.processor.SetPropertyProcessor.process(
at org.apache.camel.processor.RedeliveryErrorHandler.process(
at org.apache.camel.processor.CamelInternalProcessor.process(
at org.apache.camel.processor.Pipeline.process(
at org.apache.camel.processor.Pipeline.process(
at org.apache.camel.processor.CamelInternalProcessor.process(
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(
at org.apache.camel.component.timer.TimerConsumer$
at java.util.TimerThread.mainLoop(

The script:

import org.apache.camel.*
import org.apache.camel.impl.*
import org.apache.camel.builder.*

def camelContext = new DefaultCamelContext()
camelContext.addRoutes(new RouteBuilder() {
   def void configure() {
               .setProperty('henk') { 'aaa' }

addShutdownHook{ camelContext.stop() }
synchronized(this){ this.wait() }

Claus Ibsen
----------------- @davsclaus
Camel in Action 2:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message