Problem consuming and transforming pop3 email messages
peaceman Jan 17, 2013 2:19 PMHi,
i currently have a problem with fuse esb.
i want to consume a email via pop3.
My test setup works for this. I Can receive email from my gmail account via pop3.
However when trying to enrich, transform or extend the Message-Body of the email i got this exception:
19:46:43,080 | ERROR | op.gmail.com:995 | DefaultErrorHandler | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Failed delivery for (MessageId: ID--PC-65526-1358444279203-18-1 on ExchangeId: ID-Marcel-PC-65526-1358444279203-18-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.TypeConversionException: Error during type conversion from type: com.sun.mail.util.QPDecoderStream to the required type: byte[] with value com.sun.mail.util.QPDecoderStream@5a92ea0d due java.io.IOException: Stream closed
org.apache.camel.TypeConversionException: Error during type conversion from type: com.sun.mail.util.QPDecoderStream to the required type: byte[] with value com.sun.mail.util.QPDecoderStream@5a92ea0d due java.io.IOException: Stream closed
at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:126)
at org.apache.camel.core.osgi.OsgiTypeConverter.convertTo(OsgiTypeConverter.java:102)
at org.apache.camel.util.ExchangeHelper.convertToType(ExchangeHelper.java:199)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.impl.StringDataFormat.unmarshal(StringDataFormat.java:54)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
Caused by: org.apache.camel.RuntimeCamelException: java.io.IOException: Stream closed
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1271)
at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:927)
at org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:47)
at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:253)
at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:111)
... 52 more
blueprint.xml:
<log logName="1" loggingLevel="INFO" message="mail received body: $"/> <unmarshal> <string/> </unmarshal> <log logName="2" message="body: $"/>
</route>
</camelContext>
</blueprint>
After reading the documentation (http://fusesource.com/docs/esb/4.4.1/camel_component_ref/_IDU_Mail.html)
i expected an usable String-Object however i got some kind of Stream.
Does anybody know how to properly handle incoming pop3 messages.
Any help is appreciated.
Regrads
Marcel
Edited by: mfried on Jan 17, 2013 7:18 PM