Unable to export Team Calendars to iCalendar due to NoSuchElementException

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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:

["java.util.NoSuchElementException"]



Diagnosis

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

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
    (warning) 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


Last modified on Jan 11, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.