Claus, I wanted to let you know that this unsupported charset issue is still a problem with Camel 2.0.0 (camel-mail-2.0.0.jar), even though I'm now using "ignoreUnsupportedCharset=true". Here's the stack trace:
Nov 3, 2009 5:02:50 AM org.apache.camel.processor.Logger log SEVERE: Failed to extract body due to: ansi_x3.110-1983. Exchange: Exchange[MailMessage: messageNumber=[478], from=["do-not-re...@activateddesings.com" <a...@activateddesigns.com>], to=[Weathermeister TFR Notifier <t...@weathermeister.com>], subject=[New Email Address], sentDate=[Nov 2, 2009 5:12:54 PM], receivedDate=[Nov 2, 2009 5:12:55 PM]]. Message: com.sun.mail.imap.imapmess...@a2bd15 org.apache.camel.RuntimeCamelException: Failed to extract body due to: ansi_x3.110-1983. Exchange: Exchange[MailMessage: messageNumber=[478], from=["do-not-re...@activateddesings.com" <a...@activateddesigns.com>], to=[Weathermeister TFR Notifier <t...@weathermeister.com>], subject=[New Email Address], sentDate=[Nov 2, 2009 5:12:54 PM], receivedDate=[Nov 2, 2009 5:12:55 PM]]. Message: com.sun.mail.imap.imapmess...@a2bd15 at org.apache.camel.component.mail.MailBinding.extractBodyFromMail(MailBinding.java:215) at org.apache.camel.component.mail.MailMessage.createBody(MailMessage.java:86) at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:43) at org.apache.camel.impl.MessageSupport.copyFrom(MessageSupport.java:133) at org.apache.camel.impl.DefaultMessage.copyFrom(DefaultMessage.java:51) at org.apache.camel.component.mail.MailMessage.copyFrom(MailMessage.java:117) at org.apache.camel.impl.MessageSupport.copy(MessageSupport.java:127) at org.apache.camel.component.mail.MailMessage.copy(MailMessage.java:61) at org.apache.camel.component.mail.MailMessage.copy(MailMessage.java:40) at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:61) at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:44) at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48) at org.apache.camel.component.mail.MailConsumer.processExchange(MailConsumer.java:195) at org.apache.camel.component.mail.MailConsumer.processBatch(MailConsumer.java:153) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:111) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:99) 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:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.UnsupportedEncodingException: ansi_x3.110-1983 at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52) at java.io.InputStreamReader.<init>(InputStreamReader.java:83) at com.sun.mail.handlers.text_plain.getContent(text_plain.java:82) at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:775) at javax.activation.DataHandler.getContent(DataHandler.java:522) at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1380) at org.apache.camel.component.mail.MailBinding.extractBodyFromMail(MailBinding.java:213) ... 24 more I'm attaching the source email message, whose Content-Type header is: Content-type: text/plain; charset=ansi_x3.110-1983 Am I doing something wrong, or does ignoreUnsupportedCharset not work in this case? Thanks, Dan http://old.nabble.com/file/p26160108/message-ansi_x3.110-1983 message-ansi_x3.110-1983 Claus Ibsen-2 wrote: > > On Mon, Aug 3, 2009 at 2:53 PM, dcheckoway<dchecko...@gmail.com> wrote: >> >> Claus, >> >> Thanks for the reply. It is a valid charset name, but java6 has no >> knowledge of it (yet). For example, on my linux box, it lives in >> /usr/share/i18n/charmaps/ANSI_X3.110-1983.gz right alongside all the >> other >> typical charsets. >> > > Thanks for the findings. > >> The mail server is whatever google uses...imap.gmail.com is the host I'm >> having Camel poll. >> >> I'm using Camel 2.0-M1. >> > > I will work on the ticket allowing you to remedy this by changing it > to another charset of your choice, such as utf-8 or iso-8859-1 or what > you like. > > And I wonder if we should add a simpler boolean flag where you can set > whether camel-mail should ignore unknown charset and default to use > the platforms charset then? > > > > >> --Dan >> >> >> Claus Ibsen-2 wrote: >>> >>> I have newer heard of such a charset. Can you try google this to see >>> if its actually a valid charset name. I do think that its a mistake >>> and the mail server do not care anyway. >>> >>> Which mail server are you using? >>> >>> And also you should always state which version of Camel you are using! >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Camel-Mail-issue-with-unsupported-charset-tp24755585p24790290.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > > -- View this message in context: http://old.nabble.com/Camel-Mail-issue-with-unsupported-charset-tp24755585p26160108.html Sent from the Camel - Users mailing list archive at Nabble.com.