It may be because the date format inside the mail is not
correctly parsed. You may want to try with sun's javamail
implementation instead (remove the geronimo-javamail and
geronimo-activation jars from the /lib dir and replace them
by sun's ones [1,2]). Else it could be your mail provider
which sends a non compliant date header.
[1] http://repo.mergere.com/maven2/javax/mail/mail/1.4/mail-1.4.jar
[2]
http://repo.mergere.com/maven2/javax/activation/activation/1.1/activation-1.1.jar
On 10/17/06, Paul Haeder <[EMAIL PROTECTED]> wrote:
I'm using the class org.apache.servicemix.components.email.MimeMailPoller to
receive emails. The connection to the server seems to be working. When there
is an incoming email though, an NPE is thrown:
java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1032)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
at java.text.DateFormat.format(DateFormat.java:314)
at
org.apache.servicemix.components.email.MimeMailMarshaler.prepareExchange(MimeMailMarshaler.java:72)
MimeMailMarshaler.java:72 reads: String sentDate =
getDateFormat().format(mimeMessage.getSentDate());
So I guess that the message's sent date is returned as null. The email
header does contain a 'Date' field, though.
Is there any way to resolve this problem?
Cheers,
Paul
--
View this message in context:
http://www.nabble.com/NPE-when-receiving-email-tf2456036.html#a6845571
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Cheers,
Guillaume Nodet