Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

Cannot create an Appointment - NullPointerException

$
0
0
The following code works on Windows 7, but it fails on Windows Server 2003 (Tomcat)

Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
Date startDate = calendar.getTime();
calendar.add(Calendar.HOUR, 1);
Date endDate = calendar.getTime();

MailAddressCollection attendees = new MailAddressCollection();
attendees.add(...);
MailAddress organizer = new MailAddress(..., ...);
Appointment app = new Appointment("", "", messageBody, startDate, endDate, organizer, attendees);

This is the exception I get on the last line:
       at com.aspose.email.Appointment.resetTimeZone(Unknown Source)
at com.aspose.email.Appointment.<init>(Unknown Source)
at com.aspose.email.Appointment.<init>(Unknown Source)
at com.aspose.email.Appointment.<init>(Unknown Source)
at com.aspose.email.Appointment.<init>(Unknown Source)


I need some help ASAP as it happens in production.

Thanks,
Mariusz

Viewing all articles
Browse latest Browse all 1367

Trending Articles