camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HockeyDave <david_peterson4...@yahoo.com>
Subject Process Mail Attachment InvalidPayloadException Camel 1.4.0
Date Sat, 11 Oct 2008 23:52:55 GMT

How do I specify the mail payload format?
Thanks
Dave

<camelContext id="camel"
		xmlns="http://activemq.apache.org/camel/schema/spring">
		<route> <!--
&amp;deleteProcessedMessages=true&amp;contentType=multipart/mixed -->
			<from
			
uri="pop3://mymailbox@localhost:110?password=mypassword&amp;consumer.delay=60000"
/>
			<to uri="bean:MailReader" />
			<unmarshal>
				<csv />
			</unmarshal>
			<to uri="bean:DartCSVConverter" />
			<to uri="mock:finish" />
		</route>
	</camelContext>
	<bean id="MailReader" class="com.contextweb.mail.MailReader">
	</bean>

org.apache.camel.InvalidPayloadException: No in body available of type:
java.io.InputStream but has value: javax.mail.internet.MimeMultipart@1b071c0
of type: javax.mail.internet.MimeMultipart on: MailMessage:
messageNumber=[1], from=[David Peterson <dpeterson@contextweb.com>],
to=[reportdev <reportdev@contextweb.com>], subject=[FW: Doritos MTD],
sentDate=[Oct 11, 2008 7:44:02 PM] on the exchange: Exchange[MailMessage:
messageNumber=[1], from=[David Peterson <dpeterson@contextweb.com>],
to=[reportdev <reportdev@contextweb.com>], subject=[FW: Doritos MTD],
sentDate=[Oct 11, 2008 7:44:02 PM]]
	at
org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:127)
	at
org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:41)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
	at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
	at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
	at
org.apache.camel.component.mail.MailConsumer.processMessage(MailConsumer.java:169)
	at
org.apache.camel.component.mail.MailConsumer.processMessages(MailConsumer.java:151)
	at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:105)
	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:65)
	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:181)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
[onent.mail.MailComponent@4ab2f] DeadLetterChannel              ERROR
Exchange[BodyType:javax.mail.internet.MimeMultipart, Body:
-- 
View this message in context: http://www.nabble.com/Process-Mail-Attachment-InvalidPayloadException-Camel-1.4.0-tp19937573s22882p19937573.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message