VCard parser exception



  • E/davdroid.Contact(10700): VCard parser exception
    E/davdroid.Contact(10700): net.fortuna.ical4j.data.ParserException: Error at line 4:Error parsing line
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:200)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:137)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.resource.Contact.parseEntity(Contact.java:134)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.resource.RemoteCollection.multiGet(RemoteCollection.java:89)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:141)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:54)
    E/davdroid.Contact(10700): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    E/davdroid.Contact(10700): Caused by: java.net.URISyntaxException: Illegal character in path at index 0: {8a949549-f840-44bb-8948-3298a6d20f52}
    E/davdroid.Contact(10700): at libcore.net.UriCodec.validate(UriCodec.java:63)
    E/davdroid.Contact(10700): at java.net.URI.parseURI(URI.java:402)
    E/davdroid.Contact(10700): at java.net.URI.<init>(URI.java:204)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.property.Uid.<init>(Uid.java:80)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.property.Uid$Factory.createProperty(Uid.java:113)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.property.Uid$Factory.createProperty(Uid.java:1)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.parseProperty(VCardBuilder.java:261)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:197)
    E/davdroid.Contact(10700): ... 6 more

    Right before in the log, there is this contact:

    BEGIN:VCARD
    VERSION:3.0
    PRODID:-//Kolab//iRony DAV Server 0.2.4//Sabre//Sabre VObject 2.1.0//EN
    UID:{feec5b81-d82d-49f3-8d79-09ac6036e17e}
    FN:Thomas Mustermann
    N:Mustermann;Thomas;;;
    EMAIL;TYPE=INTERNET,OTHER:mustermann@gmx.de
    TEL;TYPE=CELL:+4964646540
    PHOTO;BASE64:/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQg[...snip....]==
    REV;VALUE=DATE-TIME:20131130T103711Z
    END:VCARD



  • It seems that the contact in question is not printed to the log before the exception occurs. Most of my contacts cause exceptions in the vcard parser. I only give the ones here that are different:

    E/davdroid.Contact(10700): VCard parser exception
    E/davdroid.Contact(10700): java.lang.NullPointerException
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.parameter.Type.<init>(Type.java:82)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.parameter.Type$Factory.createParameter(Type.java:140)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.parameter.Type$Factory.createParameter(Type.java:1)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.parseParameters(VCardBuilder.java:290)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.parseProperty(VCardBuilder.java:256)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:197)
    E/davdroid.Contact(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:137)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.resource.Contact.parseEntity(Contact.java:134)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.resource.RemoteCollection.multiGet(RemoteCollection.java:89)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:141)
    E/davdroid.Contact(10700): at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:54)
    E/davdroid.Contact(10700): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    E/davdroid.RemoteCollection(10700): Ignoring unparseable entity in multi-response
    E/davdroid.RemoteCollection(10700): net.fortuna.ical4j.data.ParserException: Error at line -1:VCard parser crashed
    E/davdroid.RemoteCollection(10700): at at.bitfire.davdroid.resource.Contact.parseEntity(Contact.java:139)
    E/davdroid.RemoteCollection(10700): at at.bitfire.davdroid.resource.RemoteCollection.multiGet(RemoteCollection.java:89)
    E/davdroid.RemoteCollection(10700): at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:141)
    E/davdroid.RemoteCollection(10700): at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:54)
    E/davdroid.RemoteCollection(10700): at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    E/davdroid.RemoteCollection(10700): Caused by: java.lang.NullPointerException
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.parameter.Type.<init>(Type.java:82)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.parameter.Type$Factory.createParameter(Type.java:140)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.parameter.Type$Factory.createParameter(Type.java:1)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.VCardBuilder.parseParameters(VCardBuilder.java:290)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.VCardBuilder.parseProperty(VCardBuilder.java:256)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:197)
    E/davdroid.RemoteCollection(10700): at net.fortuna.ical4j.vcard.VCardBuilder.build(VCardBuilder.java:137)
    E/davdroid.RemoteCollection(10700): at at.bitfire.davdroid.resource.Contact.parseEntity(Contact.java:134)
    E/davdroid.RemoteCollection(10700): ... 4 more


  • developer

    1. Seems like iCal4j doesn't like the UID:{feec5b81-d82d-49f3-8d79-09ac6036e17e} field. Is it possible to remove the braces, even if they're legal according to the iCal specs? Which client did you use to create these events?


  • I don't know the reason for those braces. The card is created by Kolab's iRony framework which uses SabreDAV. Since I'm not the developer, I now filed an issue against iRony as well.


  • developer

    I will use ez-vcard as VCard lib soon, so I think this bug will be obsolete. → wontfix



  • Thanks, I'm looking forward to the new VCard lib and hope that it does not have this issue. Won't fix might not be the right tag, since this will hopefully be fixed ;)


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.