cancel
Showing results for 
Search instead for 
Did you mean: 

javax.mail.MessagingException: error loading POP3 headers;

Former Member
0 Kudos

hello everyone,

i've got a program which fetches emails handles them as multiparts (with a zip attachment) unzips the attachment processes the files within the zip (most of the time to update the database) then deletes it. Till recently it was working fine but suddenly it just loops through a few messages comes up with some exceptions and then loops through them again when they have already been processed and doesn't move on to the rest. Nothing has been changed in the code so I don't really understand what the problem can be. It comes up with some of the mail package exceptions and then some of the programs.

the java exceptions are:

javax.mail.MessagingException: error loading POP3 headers;

nested exception is:

java.net.SocketException: Software caused connection abort: recv failed

javax.mail.MessagingException: error loading POP3 headers;

nested exception is:

java.net.SocketException: Software caused connection abort: recv failed

at com.sun.mail.pop3.POP3Message.loadHeaders(POP3Message.java:448)

at com.sun.mail.pop3.POP3Message.getHeader(POP3Message.java:256)

at javax.mail.internet.MimeMessage.getSubject(MimeMessage.java:698)

(then 3 of the form: at ClassName(ClassName.java:lineNumber))

[then it prints out 2 lines from System.out.println() that the program has in it]

and then:

javax.mail.MessagingException: Exception deleting messages during close;

nested exception is:

java.net.SocketException: Software caused connection abort: recv failed

[and then it prints out a System.out.println() which indicates that the store has been closed and then it starts over with the same emails it's processed]

sorry if the post is a little vague I would greatly appreciate it though if someone could tell me what could be going wrong

thanks in advance

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

i kind of figured it out, i think it had too much incoming and the JVM has a limit of 64MB of running memory and i needed more so i ran it with the Xmx function:

java -Xmx400 Main