#509 NullPointerException after timeout

open
nobody
None
5
2014-08-13
2013-03-30
Rich Coe
No

I was downloading email, and after a timeout occurred (approximately 45 secs),
I got the following NPE:

davmail 4.2.0-2066 linux x86-64

2013-03-30 11:56:06,295 ERROR [PopConnection-57512] davmail.exchange.ExchangeSession - java.net.SocketException: Connection reset Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:830)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:787)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2216)
at davmail.exchange.ews.EwsExchangeSession.getContent(EwsExchangeSession.java:564)
at davmail.exchange.ews.EwsExchangeSession.getContent(EwsExchangeSession.java:550)
at davmail.exchange.ExchangeSession$Message.loadMimeMessage(ExchangeSession.java:1910)
at davmail.exchange.ExchangeSession$Message.getRawInputStream(ExchangeSession.java:1974)
at davmail.pop.PopConnection.run(PopConnection.java:207)
2013-03-30 11:56:06,298 WARN [PopConnection-57512] davmail.exchange.ExchangeSession - GetItem with MimeContent failed: java.net.SocketException: Connection reset Connection reset
2013-03-30 11:56:06,299 ERROR [PopConnection-57512] davmail - Error retreiving message java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.commons.httpclient.HttpMethodBase.getStatusCode(HttpMethodBase.java:570)
at davmail.exchange.ews.EWSMethod.getStatusCode(EWSMethod.java:715)
at davmail.exchange.ews.EwsExchangeSession.getContent(EwsExchangeSession.java:569)
at davmail.exchange.ews.EwsExchangeSession.getContent(EwsExchangeSession.java:550)
at davmail.exchange.ExchangeSession$Message.loadMimeMessage(ExchangeSession.java:1910)
at davmail.exchange.ExchangeSession$Message.getRawInputStream(ExchangeSession.java:1974)
at davmail.pop.PopConnection.run(PopConnection.java:207)

Discussion

  • 45 seconds is pretty short for connection timeout, there must be something wrong on the Exchange side