Free Support Forum - aspose.com

AsposeException is thrown when importing a calendar event into a PST file

Hi,
In java code I’m trying to import calendar event into PST (Aspose ver 21.3)
And getting the next exception:

com.aspose.email.AsposeException: Start date 12/8/2017 7:00:00 AM not valid for this rule - Recur every  year on the December, on the 9th day(s) of the month for a maximum of 1 occurrences.
	at com.aspose.email.MapiCalendarRecurrencePatternFactory.a(SourceFile:462)
	at com.aspose.email.MapiCalendar.a(SourceFile:841)
	at com.aspose.email.MapiCalendar.a(SourceFile:788)
	at com.aspose.email.FolderInfo.addMapiMessageItem(SourceFile:838)

The code to import into PST is next:

MapiConversionOptions options = new MapiConversionOptions(OutlookMessageFormat.***Unicode***);
options.setUseBodyCompression(false);
PersonalStorage pst = PersonalStorage.*create*("/tmp/calendar.pst", FileFormatVersion.***Unicode***);
FolderInfo tmpFolder = pst.createPredefinedFolder("Calendar", StandardIpmFolder.***Appointments***);
Appointment appt = Appointment.*load*("/tmp/event1.ical");
final MailMessage msg = new MailMessage();
msg.addAlternateView(appt.requestApointment());
final MapiMessage mapi = MapiMessage.*fromMailMessage*(msg, options);
final MapiCalendar tmpCal = (MapiCalendar) mapi.toMapiMessageItem();
String id = tmpFolder.addMapiMessageItem(tmpCal);
pst.dispose();

Please see attached event
event.zip (1.6 KB)

Please advise.
Thanks

@slavago,
Thank you for the issue description. I reproduced the error and received the same result. I’ve logged the issue in our tracking system with ID EMAILJAVA-34868. Our development team will investigate this case. I will inform you about any progress.