EWS Java API: The meeting request is out of date. The calendar couldn't be updated
Asked Answered
L

1

17

I am using the Microsoft EWS Java API to create and accept appointments on behalf of some users. The way I am doing this is by sending the meeting request and then setting up inbox watchers on the recipient's inbox and accepting the incoming MeetingRequest item:

import microsoft.exchange.webservices.data.core.service.item.MeetingRequest;

void accept(MeetingRequest request) {
  assert(!request.getIsOutOfDate());
  request.accept(false);
}

However, I get this error when I try to accept the meeting request:

microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The meeting request is out of date. The calendar couldn't be updated.
    at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)
    at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)
    at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165)
    at microsoft.exchange.webservices.data.core.ExchangeService.internalCreateResponseObject(ExchangeService.java:270)
    at microsoft.exchange.webservices.data.core.service.response.ResponseObject.internalCreate(ResponseObject.java:120)
    at microsoft.exchange.webservices.data.core.service.response.CalendarResponseMessageBase.calendarSave(CalendarResponseMessageBase.java:98)
    at microsoft.exchange.webservices.data.core.service.item.MeetingRequest.internalAccept(MeetingRequest.java:218)
    at microsoft.exchange.webservices.data.core.service.item.MeetingRequest.accept(MeetingRequest.java:184)

This corresponds to this error: ErrorMeetingRequestIsOutOfDate. I looked at MSDN for this error and could not find why this error might be happening to me.

What am I doing wrong?

Libava answered 7/1, 2016 at 19:49 Comment(1)
Do you receive the error for each user? Have you tried to use the Appointment class directly? Or, perhaps between fetching the MeetingRequest object and accepting it, the underlying object is changes on the server. Make sure there is no such delay... As a test, instead of calling "accept", check its "LastModifiedTime" property. Then re-fetch the object from the server and check its "LastModifiedTime" property again. Are they different?Antistrophe
D
1

Speaking strictly from the Outlook client end of the question here is a list of (albeit outdated) potentially useful reasons why that error would be generated.

https://support.microsoft.com/en-us/kb/899704

Repeat events, where the initial event is in the past is a common scenario (most common to my experience) when the whole process is manual (i.e. a new attendee added after the first repeated event) though there are several more in the list that may apply here.

Edit - I mention the repeats here as a potential trip up for your code. Does the getIsOutOfDate() check the current event or the initial start of the pattern...

The MSKB is littered with this as an ongoing issue, both programmatically and scenarios simply from the Outlook client GUI.

Edit again - That is to say, you aren't doing anything wrong programmatically, there long and frustrating history from the front end as well. You may need to trap more than just ErrorCalendarMeetingRequestIsOutOfDate to avoid it.

http://www.experts-exchange.com/questions/24578557/This-Request-is-Out-of-Date.html

(sorry number of links limited by my profile)

Dimorphism answered 17/1, 2016 at 17:49 Comment(2)
Hi, thanks for the links. These meetings are NOT recurring events at all.Libava
The ancient link to the MSKB had several other scenarios, both real features and other reproducible strangenesses. The troubleshooting point is it is emitting the error that has been known to be caused, in fact or in error by one of these things...My next best guess would be the (erroneous) issues delegation and ownership. You need to trap more than just ErrorCalendarMeetingRequestIsOutOfDate to identify it.Dimorphism

© 2022 - 2024 — McMap. All rights reserved.