Re: Re: Exception in IMAPBodyPart

Cedric Hyppolite <[email protected]> Fri, 28 Apr 2006 16:50:11 +0200
Newsgroups gmane.comp.java.classpath.extensions.discuss
Message-ID <[email protected]>
Le 28 avr. 06 =C3=A0 10:52, Chris Burdess a =C3=A9crit :

> Cedric Hyppolite wrote:
>> The exact stack trace is:
>>
>> java.lang.ClassCastException
>> 	at =
gnu.mail.providers.imap.IMAPBodyPart.update(IMAPBodyPart.java:=20
>> 189)
>> 	at =
gnu.mail.providers.imap.IMAPBodyPart.fetch(IMAPBodyPart.java:129)
>> 	at gnu.mail.providers.imap.IMAPBodyPart.fetchContent=20
>> (IMAPBodyPart.java:107)
>> 	at gnu.mail.providers.imap.IMAPBodyPart.getDataHandler=20
>> (IMAPBodyPart.java:247)
>> 	at =
javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:=20
>> 683)
>> 	at gnu.mail.providers.imap.IMAPBodyPart.getContent=20
>> (IMAPBodyPart.java:261)
>>
>> C=C3=A9dric
>>
>> Le 26 avr. 06 =C3=A0 21:13, Cedric Hyppolite a =C3=A9crit :
>>
>>> Hi Chris, all,
>>>
>>> The first problem is now solved. (Thread 'bug in MIME header =20
>>> parsing')
>>>
>>> However I still can't read the message. The following code throws =20=

>>> an exception on the same message I sent you already.
>>>
>>>
>>>
>>> 		Message message[] =3D folder.getMessages();
>>> 		FetchProfile fetchProfile =3D new FetchProfile();
>>> 	=09
>>> 		fetchProfile.add(UIDFolder.FetchProfileItem.ENVELOPE);
>>> 		=
fetchProfile.add(UIDFolder.FetchProfileItem.CONTENT_INFO);
>>> 		fetchProfile.add(UIDFolder.FetchProfileItem.FLAGS);
>>> 	=09
>>> 		try {
>>> 			folder.fetch(message, fetchProfile);
>>> 		} catch (MessagingException e) {
>>> 		}
>>>
>>> 		message.getContent() // Exception !
>>>
>>>
>>> On the bright side, this exception was already present before I =20
>>> switch to CVS_HEAD.  So it should not be a side-effect
>>> of the previous fix. I thought it was linked to the first =20
>>> problem, but it seems to be a different issue.
>
> I can't reproduce the problem with my IMAP server, so it seems =20
> likely it's down to an odd server-specific response to the FETCH. =20
> If you could send tcpdump transcripts of the IMAP conversation I =20
> should be able to work out what's going on.

Hi,

Actually I can't reproduce it either after I deleted all the mails =20
sent with the previous version of JavaMail.
I guess, it was a side effect of the other bug.

Thanks for your time !

C=C3=A9dric


> --=20
> =E7=8A=AC Chris Burdess
>   "They that can give up essential liberty to obtain a little safety
>   deserve neither liberty nor safety." - Benjamin Franklin
>
>
>
>