geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Warner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-2681) IOException when reading content of a message
Date Tue, 30 Jan 2007 04:35:33 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468496
] 

Jason Warner commented on GERONIMO-2681:
----------------------------------------

I've started to take a look at this issue but I am having trouble reproducing the problem.
 I ran the code you placed in there with modifications to only pull a couple of messages from
my gmail account.  It didn't have any problems pulling them off there and then displaying
them.  Have you verified that the messages were succesfully received before attempting to
read them?  

> IOException when reading content of a message
> ---------------------------------------------
>
>                 Key: GERONIMO-2681
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2681
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 2.0-M1
>            Reporter: Geist Alexander
>         Assigned To: Jason Warner
>
> Reading a content from a simple text-message. Tests with another text-messege returns
an empty String.
> Sample code:
>             Folder folder = store.getFolder("INBOX");
>             folder.open(Folder.READ_WRITE);
>            Message message[] = folder.getMessages();
>            for (int msgNum = 0; msgNum < message.length; msgNum++) {
>               String text = (String)message[msgNum].getContent();
> java.io.IOException: Underlying input stream returned zero bytes
>    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:268)
>    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
>    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
>    at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:107)
>    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:93)
>    at java.io.InputStreamReader.read(InputStreamReader.java:151)
>    at org.apache.geronimo.mail.handlers.TextHandler.getContent(TextHandler.java:107)
>    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:774)
>    at javax.activation.DataHandler.getContent(DataHandler.java:521)
>    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:923)
>    at keygen.main.MailReceiver.receive(MailReceiver.java:49)
>    at keygen.main.MailReceiver.main(MailReceiver.java:173) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message