Receiving ParseException because of semicolon

Help
verbicide
2011-09-28
2013-08-01
  • verbicide

    verbicide - 2011-09-28

    While parsing an iCalendar event I received a ParseException for a multiline property with a list.  Specifically I received the following exception using version 1.0.1:

    net.fortuna.ical4j.data.ParserException: Error at line 27:Expected [-3], read [10]
    

    The property value looks like:

    ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN="participant";
     RSVP=FALSE:mailto:participant@somewhere.com
    

    If I move the ';' a the end of line 1 to the beginning of line 2 then there is no problem.  So, before I go submitting a bug I wanted to see if this was legal format.  According to the ABNF in the spec a line can end in a semicolon (0x3B)

    VALUE-CHAR = WSP / %x21-7E / NON-US-ASCII
    

    It appears that once a ';' is reached, the parser expects a valid token that is not EOL.  Any thoughts?

     
  • Ben Fortuna

    Ben Fortuna - 2011-09-28

    Hi,

    I wrote a quick test and it seems to parse ok for me. Is it possible that the original file isn't using the correct line terminators (\r\n), as that error seems to be what you will see when only (\n) terminates a line. By editing the file perhaps you have inadvertently replaced the line terminator with (\r\n) resulting in the success.

    Perhaps try enabling the relaxed unfolding Compatibility Hint to see if the original file passes. More details here:

    http://wiki.modularity.net.au/ical4j/index.php?title=Compatibility

    regards,
    ben

     
  • verbicide

    verbicide - 2011-09-30

    Ben,

    First off, yes I'm using relaxed unfolding…should have included that.  Secondly, I'm parsing input direct from the mail server and only edited a copy of the original input to see what the problem might be.  On closer inspection, I looked at the hex dump and yes, the CR is missing from the input.  So, the original input is not inline with the spec (funny since it's a Domino server). 

    I have several iCal events that I'm using as test cases and this is the only one that has issues and the only one that ends a property line with a semicolon.  My guess is that there is a bug in the Domino server code that did not include the carriage return before the line feed.  Not exactly your problem to fix but have any suggestions?

    Regards

     
    • Vincent

      Vincent - 2013-08-01

      Hi,
      How to connect Domino server use with ical4j-connector?
      Do you provide a simple example to me?

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks