Apologies in advance if the bug lies between my chair and my keyboard, but…
Ive been trying to get the connector to work with google's calendar using the following code..
url = new URL("https", "www.google.com", 443, "/");
CalDavCalendarStore store = new CalDavCalendarStore("-//MacTI//WOCal//EN", url, PathResolver.GCAL);
and I get the following error
net.fortuna.ical4j.connector.FailedOperationException: Principals not found at
where should be
looking through the code for connect() I noticed…
final String principalPath = pathResolver.getPrincipalPath(username);
final String userPath = pathResolver.getUserPath(getUserName());
davClient = new DavClient(rootUrl, principalPath, userPath);
this.username = username;
pathResolver.getUserPath(getUserName()); is called before username is set, so it will always return null. Id really appreciate a bit of advice about this as I am very stuck on my first job out of uni.
Remove the slash in the URL call, and remove the ; after google.com too. So the URL should be:
new URL("https", "www.google.com", 443, "");
Ah, the ; was added by the forum, it added it for me too. But anyway you need to remove the slash in the last argument on the URL constructor.
Hi thanks for the reply :) It seems the problem was with the username I was using in
it should be store.connect("firstname.lastname@example.org", "buzzandrewhives".toCharArray());
please, I need help with removeCalendar, as I seem to be able to remove from for instance Baïkal server, but the same code is not working with google:
collection.getCalendar(uids); - gives me Calendar object and this is OK
collection.removeCalendar(uids); - throws
net.fortuna.ical4j.connector.FailedOperationException: HTTP/1.1 404 Not Found
please give me a clue with this as I have no idea what it can be. Thank you in advance.