Menu

Possible bug with RRULE

Heladito
2006-09-27
2013-06-05
  • Heladito

    Heladito - 2006-09-27

    If you try to parse the following RRULE, the parser throws an Exception:

    RRULE:W1 FR #0

    This is a valid RRULE and I get the follwing Exception:
        [java] net.fortuna.ical4j.data.ParserException: An error ocurred during parsing - line: 10
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:142)
        [java]      at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:170)
        [java]      at org.jahia.suite.calendar.util.ICalendarValidator.main(ICalendarValidator.java:39)
        [java] Caused by: java.util.NoSuchElementException
        [java]      at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
        [java]      at net.fortuna.ical4j.model.Recur.<init>(Recur.java:200)
        [java]      at net.fortuna.ical4j.model.property.RRule.setValue(RRule.java:111)
        [java]      at net.fortuna.ical4j.data.CalendarBuilder.propertyValue(CalendarBuilder.java:265)
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parseProperty(CalendarParserImpl.java:234)
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:170)
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parseComponent(CalendarParserImpl.java:336)
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:167)
        [java]      at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:108)
        [java]      ... 2 more

     
    • Ben Fortuna

      Ben Fortuna - 2006-09-27

      Heladito,

      I don't believe the syntax of this RRULE is valid. The syntax definition is available in RFC2445 under section "4.3.10 Recurrence Rule".

      http://www.faqs.org/rfcs/rfc2445.html

      regards,
      ben

       
    • Heladito

      Heladito - 2006-09-27

      Ben,

      That was also my opinion, but then I came across this:

      http://www.imc.org/ietf-calendar/archive1/msg00297.html

      You have examples of this format...
      The problem is that I am using Funambol 3.0 to synchronize calendars with MS-Outlook. The Funambol team wrote a converter to convert MS-Outlook's recurring patterns into RRULEs. Actually, the example I gave you was the result of Funambol's converter after I had specified a reccurence pattern in Outlook. Ical4j didn't like it...

       
      • Ben Fortuna

        Ben Fortuna - 2006-09-27

        Heladito,

        Those examples are in the original VCalendar format (i.e. Version 1.0). iCal4j only support iCalendar (Version 2.0). You might want to check if Funambol supports iCalendar transformations in addition to VCalendar ones.

        regards,
        ben

         
    • Heladito

      Heladito - 2006-09-28

      Ben,

      Unfortunately, Funambol only has a vCalendar (v 1.0) converter...

      I guess, I'll have to write my own converter to get a RRULE into a iCalendar format... I guess, you don't know any thing about converting RRULEs from vCalendar to iCalendar, do you ?

      Thanks for your help

       
      • Ben Fortuna

        Ben Fortuna - 2006-09-28

        I'm not aware of any such tools.

        I'm curious though: I thought Outlook can generate iCalendar files directly. Why do you need Funambol to convert recurrences into RRULES?

        Please excuse my ignorance - I don't use Outlook when I'm at home. :)

        regards,
        ben

         
    • Heladito

      Heladito - 2006-09-29

      We use Funambol to Synchronize calendars on different devices with a calendar server. Thus, one of the device we want to support is MS-Outlook. Funambol has developped a plugin that extracts Outlook's data enabling the synchronization using the SyncML protocol. It is during that synchronization process that they convert the Outlook data into vCalendar, and that I run into trouble with the RRULEs.

      Regards,

      Xavier

       
      • Ben Fortuna

        Ben Fortuna - 2006-10-01

        Xavier,

        I think perhaps the best course of action is to see if the Funambol guys would consider adding support for iCalendar conversion of Outlook data.

        From their website it seems that they are interested in supporting greater connectivity via some kind of plugin architecture, so this may fall into that category:

        http://www.funambol.com/opensource/codesniperprogram.html

        You could possible even offer to do this yourself, and if it is compatible with their program they may even compensate you for it.

        As long as they provide the mechanism for reading the Outlook data, I'm sure it wouldn't be too difficult to use iCal4j to generate iCalendar-compliant data, although I couldn't find much info on how their plugin architecture works.

        regards,
        ben

         

Log in to post a comment.