classpathx-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-discuss] Re: Exception in IMAPBodyPart


From: Cedric Hyppolite
Subject: [Classpathx-discuss] Re: Exception in IMAPBodyPart
Date: Wed, 26 Apr 2006 21:18:08 +0200


The exact stack trace is:

java.lang.ClassCastException
        at gnu.mail.providers.imap.IMAPBodyPart.update(IMAPBodyPart.java:189)
        at gnu.mail.providers.imap.IMAPBodyPart.fetch(IMAPBodyPart.java:129)
at gnu.mail.providers.imap.IMAPBodyPart.fetchContent (IMAPBodyPart.java:107) at gnu.mail.providers.imap.IMAPBodyPart.getDataHandler (IMAPBodyPart.java:247)
        at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:683)
at gnu.mail.providers.imap.IMAPBodyPart.getContent(IMAPBodyPart.java: 261)

Cédric

Le 26 avr. 06 à 21:13, Cedric Hyppolite a écrit :

Hi Chris, all,

The first problem is now solved. (Thread 'bug in MIME header parsing')

However I still can't read the message. The following code throws an exception on the same message I sent you already.



                Message message[] = folder.getMessages();
                FetchProfile fetchProfile = new FetchProfile();
                
                fetchProfile.add(UIDFolder.FetchProfileItem.ENVELOPE);
                fetchProfile.add(UIDFolder.FetchProfileItem.CONTENT_INFO);
                fetchProfile.add(UIDFolder.FetchProfileItem.FLAGS);
                
                try {
                        folder.fetch(message, fetchProfile);
                } catch (MessagingException e) {
                }

                message.getContent() // Exception !


On the bright side, this exception was already present before I switch to CVS_HEAD. So it should not be a side-effect of the previous fix. I thought it was linked to the first problem, but it seems to be a different issue.

Any idea/fix would be appreciated.

Regards,

Cedric HYPPOLITE








reply via email to

[Prev in Thread] Current Thread [Next in Thread]