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);
store.connect("andrewbuzzhives", "buzzandrewhives".toCharArray());
store.getCollections();
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);
davClient.begin(username, password);
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.
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it should be store.connect("andrewbuzzhives@gmail.com", "buzzandrewhives".toCharArray());
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-07-05
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
at net.fortuna.ical4j.connector.dav.CalDavCalendarCollection.removeCalendar(CalDavCalendarCollection.java:465)
please give me a clue with this as I have no idea what it can be. Thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
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);
store.connect("andrewbuzzhives", "buzzandrewhives".toCharArray());
store.getCollections();
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);
davClient.begin(username, password);
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.
thanks
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
store.connect("andrewbuzzhives", "buzzandrewhives".toCharArray());
it should be store.connect("andrewbuzzhives@gmail.com", "buzzandrewhives".toCharArray());
Thanks.
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
at net.fortuna.ical4j.connector.dav.CalDavCalendarCollection.removeCalendar(CalDavCalendarCollection.java:465)
please give me a clue with this as I have no idea what it can be. Thank you in advance.