camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swwyatt <steven.wy...@sungard.com>
Subject Simple langauge in 2.9
Date Tue, 07 Feb 2012 19:31:08 GMT
Anyone know what I'm doing wrong?

In 2.8.1 I have the following:

			<camel:choice>
				<camel:when>
					<camel:simple>${file:ext} == 'aa' or ${file:ext} == 'AA'</camel:simple>
					<camel:to uri="file:{{AA_PATH}}"></camel:to>
				</camel:when>
				<camel:otherwise>
					<camel:to uri="file:{{OTHER_PATH}}"></camel:to>
				</camel:otherwise>
			</camel:choice>

For 2.9, I changed the 'or' to '||', but I get an error:


org.apache.camel.language.simple.types.SimpleIllegalSyntaxException:
Unexpected token $ at location 0
${file:ext} == 'aa'
*

	at
org.apache.camel.language.simple.SimplePredicateParser.parsePredicate(SimplePredicateParser.java:64)
	at
org.apache.camel.language.simple.SimpleLanguage.createPredicate(SimpleLanguage.java:135)
	at org.apache.camel.builder.SimpleBuilder.matches(SimpleBuilder.java:73)
	at
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:66)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:322)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:213)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:115)
	at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:285)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:322)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:213)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
	at
org.apache.camel.processor.UnitOfWorkProcessor.processSync(UnitOfWorkProcessor.java:131)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:115)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
	at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:352)
	at
org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94)
	at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:175)
	at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:136)
	at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)
	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.camel.language.simple.types.SimpleParserException:
Unexpected token $
	at
org.apache.camel.language.simple.SimplePredicateParser.doParsePredicate(SimplePredicateParser.java:88)
	at
org.apache.camel.language.simple.SimplePredicateParser.parsePredicate(SimplePredicateParser.java:61)
	... 71 more



--
View this message in context: http://camel.465427.n5.nabble.com/Simple-langauge-in-2-9-tp5464283p5464283.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message