You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Bahman <ba...@online.no> on 2005/07/01 16:33:34 UTC

RE: James Exception Error

Many Thanks Steve,

It was the idea that outgoing mail should get footer and not the incoming. I
will look it that.

Thank again
Bahman


-----Original Message-----
From: Steve Brewin [mailto:sbrewin@synsys.com]
Sent: 30. juni 2005 22:10
To: 'James Users List'
Subject: RE: James Exception Error


Bahman wrote:
>
> Hei!
>
> I THINK that when I get a mail from Japan, I get this error:
>
> Error Log
> ===================
> 30/06/05 06:58:58 ERROR spoolmanager.transport: Exception
> calling AddFooter:
> Could not read message;
>   nested exception is:
> 	java.io.UnsupportedEncodingException: %CHARSET
> javax.mail.MessagingException: Could not read message;
>   nested exception is:
> 	java.io.UnsupportedEncodingException: %CHARSET
> 	at
> org.apache.james.transport.mailets.AddFooter.service(AddFooter
> .java:97)
> 	at
> org.apache.james.transport.LinearProcessor.service(LinearProce
> ssor.java:407)
> 	at
> org.apache.james.transport.JamesSpoolManager.process(JamesSpoo
> lManager.java:
> 451)
> 	at
> org.apache.james.transport.JamesSpoolManager.run(JamesSpoolMan
> ager.java:360)
> 	at java.lang.Thread.run(Thread.java:534)
> java.io.UnsupportedEncodingException: %CHARSET
> 	at sun.io.Converters.getConverterClass(Converters.java:215)
> 	at sun.io.Converters.newConverter(Converters.java:248)
> 	at
> sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:64)
> 	at
> sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:223)
> 	at
> sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:209)
> 	at
> sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:76)
> 	at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
> 	at
> com.sun.mail.handlers.text_plain.getContent(text_plain.java:64)
> 	at
> javax.activation.DataSourceDataContentHandler.getContent(DataH
> andler.java:74
> 5)
> 	at javax.activation.DataHandler.getContent(DataHandler.java:501)
> 	at
> javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:564)
> 	at
> org.apache.james.transport.mailets.AddFooter.addToText(AddFoot
> er.java:155)
> 	at
> org.apache.james.transport.mailets.AddFooter.attachFooter(AddF
> ooter.java:200
> )
> 	at
> org.apache.james.transport.mailets.AddFooter.attachFooter(AddF
> ooter.java:221
> )
> 	at
> org.apache.james.transport.mailets.AddFooter.service(AddFooter
> .java:63)
> 	at
> org.apache.james.transport.LinearProcessor.service(LinearProce
> ssor.java:407)
> 	at
<snipped>

Ah! As discussed previously, the mail should not be carrying an encoding of
'%CHARSET' as it is invalid and this is causing JavaMail a headache. You can
work around this by handling the exception in the Mailet declaration, see
http://wiki.apache.org/james/HandlingExceptions.

As an aside, are you reaaly intending to add footers to incoming mail? This
is usually done for outgoing mail only with the addFooter mailet preceding
the remoteDelivery mailet. Just curious.

-- Steve



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org