dcsimg
IO Exception during call to getContent()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ron_R
Posted On:   Monday, September 10, 2001 12:24 PM

I've got the standard MimeMultiPart decode method (straight out of the example code from Sun) but I'm having problems reading certain e-mail messages. Every time I call getContent or getInputStream on what I know to be com.sun.mail.imap.IMAPBodyPart with a content type of TEXT/PLAIN, the method ends up throwing an IO Exception from deep in the JavaMail API. My stack dump looks like java.io.IOException: No content at com.sun.mail.imap.IMAPInputStream.fill at com.sun.mail.imap.IMAPInputStream.read at java.io.InputStreamReader.fill at java.io.InputStreamReader.read at com.sun.mail.handlers.text_plain.getContent at    More>>

I've got the standard MimeMultiPart decode method (straight out of the example code from Sun) but I'm having problems reading certain e-mail messages.


Every time I call getContent or getInputStream on what I know to be com.sun.mail.imap.IMAPBodyPart with a content type of TEXT/PLAIN, the method ends up throwing an IO Exception from deep in the JavaMail API.


My stack dump looks like

			
java.io.IOException: No content


at com.sun.mail.imap.IMAPInputStream.fill
at com.sun.mail.imap.IMAPInputStream.read
at java.io.InputStreamReader.fill
at java.io.InputStreamReader.read
at com.sun.mail.handlers.text_plain.getContent
at javax.activation.DataSourceDataContentHandler.getContent
at javax.activation.DataHandler.getContent
at javax.mail.internet.MimeBodyPart.getContent



I have no clue as to what causes this to happen, but I know that it is fairly easy for me to produce an e-mail that breaks JavaMail. Any suggestions? I'm really not looking forward to developing my own JavaMail.

Thanks!    <<Less

Re: IO Exception during call to getContent()

Posted By:   John_Zukowski  
Posted On:   Monday, September 10, 2001 12:28 PM

Send an email to the JavaMail mailing list so the engineers behind the API can check into the problem. Include test program.

My first question would be from what are you producing the email? Perhaps the sending program is broken / doesn't follow the spec.

About | Sitemap | Contact