Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-61889

Error when exporting ICal calendar: Property [ORGANIZER] must be specified once

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.4 CE GA5, 6.2.X EE, 7.0.0 Beta 2
    • Fix Version/s: 6.2.X EE, 7.0.0 Beta 3
    • Component/s: Calendar
    • Labels:
      None

      Description

      Seems ORGANIZER calendar field is mandatory when making PUBLISH within a ICal calendar.

      Steps to reproduce

      1. Be sure to not have LPS-60637 already fixed
      2. To reproduce this issue, we need to prepare special bundles:
        a. In ee-6.2.x, remove all ical4j properties from system.properties
        b. In master, remove all ical4j* from system.properties AND add an empty ical4j.properties in calendar portlet.
      3. Add calendar portlet.
      4. Add an event in any day.
      5. Get the recently added event id through SQL:
        SELECT calendarBookingId from CalendarBooking
        
      6. Execute this Groovy snippet throught Control Panel, replacing the calendarBookingId value by the one obtained previously:
      Sample for master
      import com.liferay.calendar.service.CalendarBookingLocalServiceUtil;
      import com.liferay.calendar.exporter.CalendarDataHandler;
      import com.liferay.calendar.exporter.CalendarDataHandlerFactory;
      
      
      long calendarBookingId = <HERE_SET_CALENDAR_BOOKING_ID>;
      
      String calendarICS = CalendarBookingLocalServiceUtil.exportCalendarBooking(calendarBookingId, "ics");
      
      out.println("Calendar booking:"+calendarICS);
      
      Sample for 6.2.x
      String portletContext = "calendar-portlet";
      String portletServiceName = "com.liferay.calendar.service.CalendarBookingLocalService";
      
      long calendarBookingId = <HERE_SET_CALENDAR_BOOKING_ID>;
      
      def calendarService = com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(portletContext, portletServiceName);
      
      try {
      		def booking = calendarService.exportCalendarBooking(calendarBookingId, "ics");
      
      		out.println("Calendar booking:"+booking);
      } catch (Exception e) {
      	e.printStackTrace(out);
      }
      

      Expected result: Script returns the calendar booking.

      Actual result: error is thrown in logs:

      18:01:57,168 WARN  [default task-10][ReportMethodImpl:150] null
      net.fortuna.ical4j.model.ValidationException: Property [ORGANIZER] must be specified once
      	at net.fortuna.ical4j.util.PropertyValidator.assertOne(PropertyValidator.java:112)
      	at net.fortuna.ical4j.model.component.VEvent$PublishValidator.validate(VEvent.java:934)
      	at net.fortuna.ical4j.model.component.CalendarComponent.validate(CalendarComponent.java:83)
      	at net.fortuna.ical4j.model.Calendar.validate(Calendar.java:472)
      	at net.fortuna.ical4j.model.Calendar.validate(Calendar.java:257)
      	at net.fortuna.ical4j.data.CalendarOutputter.output(CalendarOutputter.java:96)
      	at com.liferay.calendar.util.CalendarICalDataHandler.toString(CalendarICalDataHandler.java:773)
      	at com.liferay.calendar.util.CalendarICalDataHandler.exportCalendarBooking(CalendarICalDataHandler.java:128)
      	at com.liferay.calendar.service.impl.CalendarBookingLocalServiceImpl.exportCalendarBooking(CalendarBookingLocalServiceImpl.java:427)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy352.exportCalendarBooking(Unknown Source)
      	at com.liferay.calendar.service.CalendarBookingLocalServiceUtil.exportCalendarBooking(CalendarBookingLocalServiceUtil.java:405)
      	at com.liferay.calendar.service.base.CalendarBookingLocalServiceClpInvoker.invokeMethod(CalendarBookingLocalServiceClpInvoker.java:537)
      	at com.liferay.calendar.service.base.CalendarBookingLocalServiceBaseImpl.invokeMethod(CalendarBookingLocalServiceBaseImpl.java:1315)
      	at sun.reflect.GeneratedMethodAccessor911.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy352.invokeMethod(Unknown Source)
      	at com.liferay.calendar.service.CalendarBookingLocalServiceClp.exportCalendarBooking(CalendarBookingLocalServiceClp.java:1196)
      	at com.liferay.calendar.service.CalendarBookingLocalServiceUtil.exportCalendarBooking(CalendarBookingLocalServiceUtil.java:395)
      	at it.smc.calendar.sync.caldav.methods.ReportMethodImpl.addCalendarBookingData(ReportMethodImpl.java:47)
      	at it.smc.calendar.sync.caldav.methods.ReportMethodImpl.addResponse(ReportMethodImpl.java:144)
      	at it.smc.calendar.sync.caldav.methods.BasePropMethodImpl.writeResponseXML(BasePropMethodImpl.java:103)
      	at it.smc.calendar.sync.caldav.methods.PropfindMethodImpl.process(PropfindMethodImpl.java:38)
      	at com.liferay.portal.webdav.WebDAVServlet.service(WebDAVServlet.java:117)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:57)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
      	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:198)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:788)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

        1. Fixed.PNG
          Fixed.PNG
          29 kB
        2. Fixed62.PNG
          Fixed62.PNG
          30 kB
        3. Reproduced.PNG
          Reproduced.PNG
          32 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 35 weeks, 2 days ago

                Packages

                Version Package
                6.2.X EE
                7.0.0 Beta 3