Unable to export Team Calendars to iCalendar due to NoSuchElementException

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When attempting to export Team Calendars to iCalendar (export to ICS), the error message below is thrown in a blank page:

1 ["java.util.NoSuchElementException"]

Diagnosis

Confirm that the following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2021-01-04 00:05:52,913 ERROR [http-nio-8090-exec-1] [calendar3.rest.ExceptionMappers.GeneralExceptionMapper] getResponseError General exception happen on calendar resources -- url: /rest/calendar-services/1.0/calendar/export/subcalendar/private/xxxxxxxxxxx.ics | traceId: xxxxxxxxx | userName: xxxxxxxxx javax.ws.rs.WebApplicationException: java.util.NoSuchElementException at com.atlassian.confluence.extra.calendar3.rest.resources.ExportResource.lambda$exportCalendarAsIcalendarTextInternal$0(ExportResource.java:133) at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) ... Caused by: java.util.NoSuchElementException at java.util.ArrayList$Itr.next(ArrayList.java:854) at net.fortuna.ical4j.model.PropertyList.getProperty(PropertyList.java:114) at net.fortuna.ical4j.model.Component.getProperty(Component.java:193) at net.fortuna.ical4j.model.component.VTimeZone.getTimeZoneId(VTimeZone.java:327) at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractCalendarDataStore.createEmptyCalendarForSubCalendar(AbstractCalendarDataStore.java:820) at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractCalendarDataStore.getSubCalendarContent(AbstractCalendarDataStore.java:751) at com.atlassian.confluence.extra.calendar3.calendarstore.SanboxSubCalendarDataStoreCachingDecorator.getSubCalendarContent(SanboxSubCalendarDataStoreCachingDecorator.java:124) at com.atlassian.confluence.extra.calendar3.calendarstore.DelegatingCalendarDataStore.getSubCalendarContent(DelegatingCalendarDataStore.java:179) at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.getSubCalendarContent(DefaultCalendarManager.java:1703)

Solution

Clearing the Plugins Cache will resolve this issue. You can clear the cache, by doing the following:

  1. Shutdown Confluence

  2. Remove the following directories

    ⚠️ This will remove the plugin cache files only and will not permanently remove any plugins. These directories will be recreated during the next Confluence startup. However, some third-party plugins may store metadata in these directories, so we recommend creating a temporary backup of the directories.

    • <confluence-home>/bundled-plugins

    • <confluence-home>/plugins-cache

    • <confluence-home>/plugins-osgi-cache

    • <confluence-home>/plugins-temp

    • <confluence-home>/bundled-plugins_language

  3. Start Confluence

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.