camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject XML <header> element
Date Sat, 28 Jun 2008 00:22:01 GMT
So in the XML, you can do something like this:

<route>
  <from uri="..." />
  <choice>
    <when>
      <header>???</header>
      <to uri="..." />
    </when>
  </choice>
</route>

My question is, what setup do I need to get this to work and what goes
in the ??? -- basically, what is the correct setup and usage for the
<header> element.  When running in Java 6 with the camel-script JAR on
the class path, I'm getting this:

[ltMessageListenerContainer-106] DeadLetterChannel              ERROR
Failed delivery for exchangeId:
ID-hagrid.local/57149-1214611750742/0-1. On delivery attempt: 0
caught: java.lang.IllegalArgumentException: No script engine could be
created for: header
java.lang.IllegalArgumentException: No script engine could be created
for: header
	at org.apache.camel.builder.script.ScriptBuilder.getEngine(ScriptBuilder.java:381)
	at org.apache.camel.builder.script.ScriptBuilder.getScriptContext(ScriptBuilder.java:422)
	at org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:484)
	at org.apache.camel.builder.script.ScriptBuilder.matches(ScriptBuilder.java:82)
	at org.apache.camel.builder.script.ScriptBuilder.matches(ScriptBuilder.java:49)
	at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:47)
	at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44)
	at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:143)
	at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:87)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:40)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:44)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:68)
	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:66)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:235)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
	at java.lang.Thread.run(Thread.java:637)

Is there some other JAR I need?  Something else?

Thanks,
       Aaron

Mime
View raw message