Published on Monday, the 4th of September, 2006 and last updated on the 23rd of May, 2007
In my continuing search for a CalDAV server I have to confess I have avoided the Java solutions. I have a number of problems with Java, not least the fact that it is not DFSG free, although that seems to slowly be changing.My initial goal is to find a server which I can use from an Evolution CalDAV client for a few fairly simple reasons:I use evolution for calendaring and e-mailEvolution is nowadays a quite stable and mature e-mail and calendar clientI want to understand the CalDAV protocol and the documentation is all but impenetrableAnyway, after playing with Apple's newly public Calendar Server, looking briefly at Chandler in the process, trying to find the Hula CalDAV support I moved on to look at Cosmo.Java on Debian - the modern wayCosmo is a java application, and it appears to require JRE 1.5 or later. Forunately things with Java aren't nearly as complicated nowadays as they used to be on Debian. I went to Sun's java download and got the latest J2SE 1.5 JRE and turned it into a Debian package using "make-jpkg" from the "java-package" package, installed that and used "update-alternatives" to make that my default Java:sudo apt-get install java-packagemake-jpkg jre-1_5_0_08-linux-i586.binsudo dpkg -i sun-j2re1.5_1.5.0+update08_i386.debsudo update-alternatives --config javaStarting Cosmo RunningI downloaded the current Cosmo 0.4 + Scooby 0.2 package, unpacked it and ran the start script:JAVAHOME=/usr bin/osafsrvctl startFollowing the Cosmo setup instructions I then browsed to http://localhost:8080/ and created myself an account.Since I've also been reading far too much about CalDAV and getting things working with Evolution, I also went into Scooby and added a calendar appointment to ensure a calendar was created for that user.Configuring the CalDAV Calendar in EvolutionIn Evolution I then added a CalDAV calendar with a URL of "caldav://localhost:8080/cosmo/home/andrew/" and added an event. Although I could see the event uploaded, this proved to be the wrong answer, and I needed to point Evolution at the "Scooby" directory:caldav://localhost:8080/cosmo/home/andrew/Scooby/Now that I have done that I can happily create events, stop evolution, clear out the calendar cache files, restart evolution and have the event show up. Phew.Differences between Cosmo and Apple Calendar ServerClearly Evolution CalDAV is sensitive to some differences between Cosmo and Calendar Server. Sniffing the traffic when I start evolution with an empty cache in both situations there are a couple of differences:Cosmo's response to the REPORT query is prettily formattedCosmo's response uses entity names like <D:response> whereas Calendar Server simply returns <response>My bet would be that it is the last one that is a problem, and that Evolution CalDAV requires the more complex "<D:multistatus xmlns:D="DAV:"><D:response><D:href>" form rather than the simpler "<multistatus xmlns='DAV:'><response><href>".All I am left is to wonder which style is correct, and whether this is a bug in Calendar Server or in Evolution-CalDAV.In my continuing search for a CalDAV server I have to confess I have avoided the Java solutions. I have a number of problems with Java, not least the fact that it is not DFSG free, although that seems to slowly be changing.
My initial goal is to find a server which I can use from an Evolution CalDAV client for a few fairly simple reasons:
- I use evolution for calendaring and e-mail
- Evolution is nowadays a quite stable and mature e-mail and calendar client
- I want to understand the CalDAV protocol and the documentation is all but impenetrable
Anyway, after playing with Apple's newly public Calendar Server, looking briefly at Chandler in the process, trying to find the Hula CalDAV support I moved on to look at Cosmo.
Java on Debian - the modern way
Cosmo is a java application, and it appears to require JRE 1.5 or later. Forunately things with Java aren't nearly as complicated nowadays as they used to be on Debian. I went to Sun's java download and got the latest J2SE 1.5 JRE and turned it into a Debian package using "make-jpkg" from the "java-package" package, installed that and used "update-alternatives" to make that my default Java:
sudo apt-get install java-package
make-jpkg jre-1_5_0_08-linux-i586.bin
sudo dpkg -i sun-j2re1.5_1.5.0+update08_i386.deb
sudo update-alternatives --config java
Starting Cosmo Running
I downloaded the current Cosmo 0.4 + Scooby 0.2 package, unpacked it and ran the start script:
JAVAHOME=/usr bin/osafsrvctl start
Following the Cosmo setup instructions I then browsed to http://localhost:8080/ and created myself an account.
Since I've also been reading far too much about CalDAV and getting things working with Evolution, I also went into Scooby and added a calendar appointment to ensure a calendar was created for that user.
Configuring the CalDAV Calendar in Evolution
In Evolution I then added a CalDAV calendar with a URL of "caldav://localhost:8080/cosmo/home/andrew/" and added an event. Although I could see the event uploaded, this proved to be the wrong answer, and I needed to point Evolution at the "Scooby" directory:
caldav://localhost:8080/cosmo/home/andrew/Scooby/
Now that I have done that I can happily create events, stop evolution, clear out the calendar cache files, restart evolution and have the event show up. Phew.
Differences between Cosmo and Apple Calendar Server
Clearly Evolution CalDAV is sensitive to some differences between Cosmo and Calendar Server. Sniffing the traffic when I start evolution with an empty cache in both situations there are a couple of differences:
- Cosmo's response to the REPORT query is prettily formatted
- Cosmo's response uses entity names like <D:response> whereas Calendar Server simply returns <response>
My bet would be that it is the last one that is a problem, and that Evolution CalDAV requires the more complex "<D:multistatus xmlns:D="DAV:"><D:response><D:href>" form rather than the simpler "<multistatus xmlns='DAV:'><response><href>".
All I am left is to wonder which style is correct, and whether this is a bug in Calendar Server or in Evolution-CalDAV.
Bug report filed
One of the guys in #calendarserver has filed a bug report in their trac:
http://trac.macosforge.org/projects/calendarserver/ticket/47
Also, an Evolution guy thinks it is worth of a bug report against Evolution as well.
-- puck
Evo && Calendar Server
I bet your bet is wrong ;-D As long as the nodes are in the right namespaces (even the default) evolution should work with that. If not it's an obscure libxml2 bug but I doubt that. You don't happen to have a network trace of a converstaion between evo and the server handy?
- Christian Kellner