DDS endpoint to email issue
woggle23 Mar 23, 2011 5:10 AMMorning Team
I'm having an issue converting a message received on a DDS endpoint to an email (using the Apache Velocity as a template) via smtp; i.e. the route is as follows:
from(ddsEndpoint)
.to("velocity://file.vm")
.to("smtp://user@localhost?password=pword&to=testuser@localhost);
Removing the velocity line, above, will allow the email to be sent; however, the content of the email is then the object type that was received at the ddsEndpoint. I obviously wish to extract elements from this object to populate an email in the velocity template.
With the velocity line included, no email is sent - and no messages are logged. However, when terminating the application (via cntrl c), the following exception is displayed:
Exception in thread "Thread-12" java.lang.NoClassDefFoundError: org/apache/camel
/util/UuidGenerator
at org.apache.camel.component.dds.DdsExchange.createExchangeId(DdsExchan
ge.java:202)
at org.apache.camel.component.dds.DdsExchange.getExchangeId(DdsExchange.
java:210)
at org.apache.camel.processor.Pipeline.createNextExchange(Pipeline.java:
220)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:71)
at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProc
essor.java:99)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at org.apache.camel.management.InstrumentationProcessor.process(Instrume
ntationProcessor.java:68)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:91)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:85)
at org.apache.camel.component.dds.DdsConsumer.createExchange(DdsConsumer
.java:364)
at org.apache.camel.component.dds.DdsConsumer.on_data_available(DdsConsu
mer.java:338)
Caused by: java.lang.ClassNotFoundException: org.apache.camel.util.UuidGenerator
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Presumably there is a problem with the class type of the object received at the ddsEndpoint? Any ideas how I can get around this?
Many thanks
Matt