2013-12-11 27 views
1

我已經使用基礎事件組件(/ libs/collab/calendar/components/event)創建了一個事件並設置了所需的值。但是,如果我嘗試下載事件ICS文件,然後它拋出以下異常:事件下載爲ICS文件

com.day.cq.wcm.core.impl.WCMDebugFilter Exception: null java.lang.NullPointerException 
    at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:769) 
    at net.fortuna.ical4j.model.TimeZoneRegistryImpl.getTimeZone(TimeZoneRegistryImpl.java:136) 
    at com.adobe.cq.social.calendar.impl.JcrTimeZoneRegistry.getTimeZone(JcrTimeZoneRegistry.java:101) 
    at com.adobe.cq.social.calendar.servlets.ICalExportServlet.doGet(ICalExportServlet.java:129) 
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268) 
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344) 
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375) 
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:508) 
    at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) 
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64) 
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:182) 
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:149) 
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) 
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:144) 

看來從該事件的時區設置爲null堆棧跟蹤。我看不到如何設置它或者錯過了其他任何東西。

感謝

+0

任何可以共享給我們的代碼? – Raptor

+0

嘗試設置默認時區。文檔[涵蓋此主題](http://dev.day.com/docs/en/cq/current/administering/social_communities/calendar_and_events.html#Defining%20Default%20Settings%20for%20Your%20Calendar)。 –

+0

@ShivanRaptor在任何頁面上創建事件,並在其中有一個「下載事件作爲ICS文件」鏈接(僅在作者模式下),單擊該鏈接。打開下載的文件並檢查它是否包含ICS數據。 – user1764832

回答

0

這實際上是對CQ側的錯誤,下面是迴響,我在Adobe論壇有:

Issue has been filled (CQ5-34388) internally. As a workaround manually set the timezone. Ex:- for geometrixx "/content/geometrixx/en/events/shapecon/jcr:content/par/event/event" path create a property called "timeZone" of type "String" and assign value as "Asia/India" which is IST time zone. 

所以,這個問題是因爲 - 「時區」沒有得到設定的事件。我注意到的一件事情是,如果您設置了日期,例如2013年12月12日的上午11:00至下午1:00,則'timeZone'確實會被設置。問題僅在時間未設置,即事件被標記作爲全天事件。