ical4j-connector error - zarafa

  • Computerlyrik

    Computerlyrik - 2012-11-14

    Hey there!

    I am trying to connect with latest hg clone of ical4j-connector to a zarafa server.

    The error produced is:

    net.fortuna.ical4j.connector.ObjectStoreException: net.fortuna.ical4j.connector.FailedOperationException: Principals not found at [/caldav]
        at net.fortuna.ical4j.connector.dav.AbstractDavObjectStore.connect(AbstractDavObjectStore.java:121)
    Caused by: net.fortuna.ical4j.connector.FailedOperationException: Principals not found at [/caldav]
        at net.fortuna.ical4j.connector.dav.DavClient.begin(DavClient.java:107)
        at net.fortuna.ical4j.connector.dav.AbstractDavObjectStore.connect(AbstractDavObjectStore.java:113)

    A Custom PathResolver is implemented.
    Tried different urls though.
    With firefox i am getting a .ics file with my testEntry in it.

    I do not know how to interpret the Error "Principals not found".

    So i did a           


    gave me


    Dunno if helps or is something unusual….

    Thank you for any help!

  • Computerlyrik

    Computerlyrik - 2012-11-14

    so not being able to edit post above…

    System.out.println was done on DavClient.java in begin() line no 100

  • Computerlyrik

    Computerlyrik - 2012-11-14

    Yes. The empty


    is correct.
    HostConiguration is used on HTTP Client execute.

    I do now know which http Code is coming in 401
    But auth works if using firefox….

  • Computerlyrik

    Computerlyrik - 2012-11-14

    So - fixed the auth credentials on store.connect(username,password.toCharArray()) now getting a
    HTTP 500

    How do i get the request String?

  • Pascal Robert

    Pascal Robert - 2012-11-14

    It's not line 100 that you should debug, it's line 104, to see which status you got. The principals is where you get information about the user, and most important, the place where you have the link to the calendar-home-set. For example, in iCal Server, the principals for my user is at /principals/users/admin/

    You can also debug the HTTP connection with a proxy (I use Charles Proxy for this), or use log4j:


  • Pascal Robert

    Pascal Robert - 2012-11-14

    500 = Internal Server Error. You can check Zarafa logs to find out why if the reason wasn't part of the response.

  • Pascal Robert

    Pascal Robert - 2012-11-14

    Ok, I just tried out with the Zarafa virtual appliance, and it's not a good CalDAV implementation. It doesn't work with the Calendar app on OS X 10.8, and it's throwing out errors for ical4j-connector.

    The thing is that ical4j-connector tries to find all properties with the following request:


    <?xml version="1.0" encoding="UTF-8"?>
    <D:propfind xmlns:D="DAV:">

    But Zarafa, instead of returning a valid DAV response, is throwing out a 500 Internal Server Error. I also tried by doing the same request to /caldav/ or /caldav/demo1/, same error.

    If you have a support contract with Zarafa, you should them to fix it.

  • Computerlyrik

    Computerlyrik - 2012-11-22

    elvisrobert, Thanks for your help!

    Poorly i do not have any support contract with zarafa people. But still it is opensource - the only thing i discovered in the sources was

     * <D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
     *      <D:prop>
     *          <D:resourcetype/>
     *          <D:owner/>
     *          <CS:getctag/>
     *      </D:prop>
     * </D:propfind>

    …..it seems "allprop" is simply not implemented.

    Still, they are propagating that their connector works with Thunder/Sunbird and some iOS Devices.

    All I want to do is to CREATE, UPDATE, DELETE Calendar entries in the users main calendar, reachable with url /caldav.

    Does ical4j connector support this features even without the allprop request being successfully?

    Is it possible to skip the "find principals" step and load the CalDav/CardDavStore directly?

  • Pascal Robert

    Pascal Robert - 2012-11-25

    I committed a fix a minute ago, try it out with Zarafa to see if it works now.

  • Lorein Watson

    Lorein Watson - 2016-04-27
    Post awaiting moderation.

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks