You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Geist Alexander (JIRA)" <ji...@apache.org> on 2007/01/02 00:41:27 UTC

[jira] Created: (GERONIMO-2681) IOException when reading content of a message

IOException when reading content of a message
---------------------------------------------

                 Key: GERONIMO-2681
                 URL: http://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


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (GERONIMO-2681) IOException when reading content of a message

Posted by "Jason Warner (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Assigned: (GERONIMO-2681) IOException when reading content of a message

Posted by "Jason Warner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Warner reassigned GERONIMO-2681:
--------------------------------------

    Assignee: Jason Warner

> 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.


[jira] Closed: (GERONIMO-2681) IOException when reading content of a message

Posted by "Jason Warner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Warner closed GERONIMO-2681.
----------------------------------

    Resolution: Won't Fix

No response from request for feedback.  I'm assuming the issue has been resolved on the user end.  Please reopen if issue is still valid.

> 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
>            Assignee: 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.