Hi Richard,

Which version of the GData Java Client Library are you using? I
noticed that you are using "setVal()" instead of "setValue()" which is
in the latest 1.14 version of the Java Client Library.  You may
download the latest jar from here:

http://code.google.com/p/gdata-java-client/downloads/list

Hope it helps,
Austin

On Oct 26, 5:41 am, "Richard Quintin" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm playing around with the API trying to create an event notification
> application.  (I can't believe this hasn't been written yet! :)
>
> Anyway when I execute code to add a property to an event I get a
> VersionConflictException.  The documentation on this exception isn't
> very revealing (at least to me).  Does anyone have any ideas what I
> might be doing wrong?
>
> Thanks for any and all help!
>
> Here is (essentially) the code I'm executing:
>
> private ExtendedProperty alertTime = new ExtendedProperty();
> alertTime.setName("GAlert! alert time";
> alertTime.setVal(Long.toString(Calendar.getInstance().timeInMillis()));
> // entry is an existing CalendarEventEntry
> entry.addExtendedProperty(alertTime);
> entry.update();
>
> Here is a sample exception stack:
> com.google.gdata.util.VersionConflictException: Conflict
> <?xml version='1.0' encoding='UTF-8'?><entry
> xmlns='http://www.w3.org/2005/Atom'
> xmlns:batch='http://schemas.google.com/gdata/batch'
> xmlns:gCal='http://schemas.google.com/gCal/2005'
> xmlns:gd='http://schemas.google.com/g/2005'><id>http://www.google.com/calendar/feeds/richardjq%40gmail.com/private/fu...</id><published>2007-10-26T12:23:53.000Z</published><updated>2007-10-26T12:­29:53.000Z</updated><category
> scheme='http://schemas.google.com/g/2005#kind'
> term='http://schemas.google.com/g/2005#event'/><title
> type='text'>test</title><content type='text'></content><link
> rel='alternate' type='text/html'
> href='http://www.google.com/calendar/event?eid=MDVja3ZldGxqYmtvaW0zcWRqaGs3...
> title='alternate'/><link rel='self' type='application/atom+xml'
> href='http://www.google.com/calendar/feeds/richardjq%40gmail.com/private/fu...><link
> rel='edit' type='application/atom+xml'
> href='http://www.google.com/calendar/feeds/richardjq%40gmail.com/private/fu...><author><name>Richard
> Quintin</name><email>[EMAIL 
> PROTECTED]</email></author><gd:comments><gd:feedLink
> href='http://www.google.com/calendar/feeds/richardjq%40gmail.com/private/fu...></gd:comments><gd:eventStatus
> value='http://schemas.google.com/g/2005#event.confirmed'/><gd:visibility
> value='http://schemas.google.com/g/2005#event.default'/><gd:transparency
> value='http://schemas.google.com/g/2005#event.opaque'/><gCal:uid
> value='[EMAIL PROTECTED]'/><gCal:sequence
> value='0'/><gd:when startTime='2007-10-26T14:00:00.000-04:00'
> endTime='2007-10-26T15:00:00.000-04:00'/><gd:who
> rel='http://schemas.google.com/g/2005#event.organizer'
> valueString='Richard Quintin'
> email='[EMAIL PROTECTED]'/><gd:where/><gd:extendedProperty
> name='GAlert! notified' value='NO'/><gd:extendedProperty name='GAlert!
> alert time' value='1193421000000'/></entry>
>
>         at 
> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(Unknown
> Source)
>         at 
> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(Unknown
> Source)
>         at 
> com.google.gdata.client.http.HttpGDataRequest.checkResponse(Unknown Source)
>         at com.google.gdata.client.http.HttpGDataRequest.execute(Unknown 
> Source)
>         at com.google.gdata.client.http.GoogleGDataRequest.execute(Unknown 
> Source)
>         at com.google.gdata.client.Service.update(Unknown Source)
>         at com.google.gdata.client.GoogleService.update(Unknown Source)
>         at com.google.gdata.data.BaseEntry.update(Unknown Source)
>         at edu.vt.dbms.galert.model.GEvent.update(GEvent.java:141)
>         at edu.vt.dbms.galert.model.GEvent.setAlertTime(GEvent.java:195)
>         at edu.vt.dbms.galert.model.GEvent.getProperties(GEvent.java:70)
>         at edu.vt.dbms.galert.model.GEvent.<init>(GEvent.java:47)
>         at edu.vt.dbms.galert.model.GCalendar.fetchEvents(GCalendar.java:117)
>         at 
> edu.vt.dbms.galert.model.GCalArrayList.fetchAllEvents(GCalArrayList.java:97­)
>         at edu.vt.dbms.galert.controller.GAlert.getEvents(GAlert.java:116)
>         at 
> edu.vt.dbms.galert.controller.GAlert.getTodaysEvents(GAlert.java:105)
>         at 
> edu.vt.dbms.galert.view.DataPanel.refreshCalendars(DataPanel.java:95)
>         at 
> edu.vt.dbms.galert.view.DataPanel$1.actionPerformed(DataPanel.java:38)
>         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
>         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
>         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>         at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.jav­a:273)
>         at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:1­83)
>         at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.jav­a:173)
>         at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
>         at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
> --
> Richard Quintin, DBA
> Database & Application Administration
> Virginia Tech


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to