Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-43781

ical export failing when ical import is disabled

    XMLWordPrintable

    Details

    • Test Plan:
      Hide

      In an environment with the following line in sakai.properties:

      calendar.external.subscriptions.enable=false 
      1. Navigate to the "Publish (private)" tab in the calendar tool of any site
      2. Generate the url
      3. Click on the second link (http://)
      4. Expect to download the resulting ics, the bug causes that to fail with a 500 server error displayed
      Show
      In an environment with the following line in sakai.properties: calendar.external.subscriptions.enable= false Navigate to the "Publish (private)" tab in the calendar tool of any site Generate the url Click on the second link ( http://) Expect to download the resulting ics, the bug causes that to fail with a 500 server error displayed

      Description

      Upgrading to Sakai 19.4 broke ical exporting (opaque url) in our test instance, with the following stacktrace:

       11-juin-2020 10:29:49.361 WARN [ajp-nio-8010-exec-17] org.sakaiproject.access.tool.AccessServlet.dispatch dispatch(): exception:
      java.lang.RuntimeException: Error loading default cache implementation. Please ensure the JCache API dependency is included in the classpath, or override the cache implementation (e.g. via configuration: net.fortuna.ical4j.timezone.cache.impl=net.fortuna.ical4j.util.MapTimeZoneCache)
              at net.fortuna.ical4j.model.TimeZoneLoader.lambda$cacheInit$1(TimeZoneLoader.java:285)
              at java.util.Optional.orElseGet(Optional.java:267)
              at net.fortuna.ical4j.model.TimeZoneLoader.cacheInit(TimeZoneLoader.java:281)
              at net.fortuna.ical4j.model.TimeZoneLoader.<init>(TimeZoneLoader.java:85)
              at net.fortuna.ical4j.model.TimeZoneRegistryImpl.<init>(TimeZoneRegistryImpl.java:125)
              at net.fortuna.ical4j.model.TimeZoneRegistryImpl.<init>(TimeZoneRegistryImpl.java:116)
              at net.fortuna.ical4j.model.DefaultTimeZoneRegistryFactory.createRegistry(DefaultTimeZoneRegistryFactory.java:48)
              at org.sakaiproject.calendar.impl.BaseCalendarService.printICalSchedule(BaseCalendarService.java:5478)
              at org.sakaiproject.calendar.impl.BaseCalendarService.handleAccessIcalCommon(BaseCalendarService.java:5850)
              at org.sakaiproject.calendar.impl.BaseCalendarService.handleAccessOpaqueUrl(BaseCalendarService.java:5939)
              at org.sakaiproject.calendar.impl.BaseCalendarService$1.handleAccess(BaseCalendarService.java:1338)
              at org.sakaiproject.access.tool.AccessServlet.dispatch(AccessServlet.java:346)
              at org.sakaiproject.access.tool.AccessServlet.doGet(AccessServlet.java:192)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
              at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:475)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
              at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:394)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NoClassDefFoundError: javax/cache/configuration/Configuration
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:264)
              at net.fortuna.ical4j.model.TimeZoneLoader.lambda$cacheInit$1(TimeZoneLoader.java:283)
              ... 46 more
      Caused by: java.lang.ClassNotFoundException: javax.cache.configuration.Configuration
              at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              ... 49 more

      I found the same error mentioned in SAK-42232, with the fix being adding the following line to the constructor for the IcalendarReader.java :

      System.setProperty("net.fortuna.ical4j.timezone.cache.impl", MapTimeZoneCache.class.getName()); 

      Since we have "calendar.external.subscriptions.enable" set to false in sakai.properties, I assume that class is never instantiated and the property is never set.

      I think that line should be moved somewhere else, perhaps the BaseCalendarService init() method?

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                maintenanceteam Core Team
                Reporter:
                curtisvo Curtis van Osch
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration