HELP - OUT OF MEMORY ERROR
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sharona_Feinberg
Posted On:   Thursday, December 20, 2001 02:15 AM

HI , I Have a code that runs well , I use POP3 if (part.isMimeType("multipart/*")) { Multipart mp = (Multipart)part.getContent(); int n=mp.getCount(); } BUT after a while I get the following : java.lang.OutOfMemoryError at java.io.ByteArrayOutputStream.write (ByteArrayOutputStream.java, Compiled Code) at com.sun.mail.pop3.Protocol.multilineCommand (Protocol.java:295) at com.sun.mail.pop3.Protocol.retr (Protocol.java:171) at com.sun.mail.pop3.POP3Message.getContentStream (POP3Message.java:116) at javax.mail.internet.MimePartDataSource.getInputSt   More>>

HI , I Have a code that runs well , I use POP3



if (part.isMimeType("multipart/*"))
{


Multipart mp = (Multipart)part.getContent();


int n=mp.getCount();


}


BUT after a while I get the following :



java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.write
(ByteArrayOutputStream.java, Compiled Code)
at com.sun.mail.pop3.Protocol.multilineCommand
(Protocol.java:295)
at com.sun.mail.pop3.Protocol.retr
(Protocol.java:171)
at com.sun.mail.pop3.POP3Message.getContentStream
(POP3Message.java:116)
at
javax.mail.internet.MimePartDataSource.getInputStream
(MimePartDataSource.java:61)
at javax.mail.internet.MimeMultipart.parse
(MimeMultipart.java:259)
at javax.mail.internet.MimeMultipart.getCount
(MimeMultipart.java:159)


please help -what is wrong ? what do I need to do ?
it is bug in pop3.jar in javaMail ?
in the mail server ?


thanks in advance - Sharona

   <<Less

Re: HELP - OUT OF MEMORY ERROR

Posted By:   John_Zukowski  
Posted On:   Thursday, December 20, 2001 08:22 PM

Try increasing the stack/heap size. How big of a message does it bomb on?

Re: HELP - OUT OF MEMORY ERROR

Posted By:   Sharona_Feinberg  
Posted On:   Thursday, December 20, 2001 07:28 AM

when using IMAP -
it works.



I still need a help with pop3 !!!



is it a bug in pop3 - I am using javaMail 1.2


I need a soultion or a workaround.



thanks , Sharona

About | Sitemap | Contact