OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
870 stars 560 forks source link

Exception sending meeting invitation microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The operation can't be performed because the item is out of date. Reload the item and try again #710

Open ramesharn opened 5 years ago

ramesharn commented 5 years ago

15:27:33,173 ERROR [EWSMeetingSender] Exception sending meeting invitation microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The operation can't be performed because the item is out of date. Reload the item and try again. 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.internalUpdateItems(ExchangeService.java:691) at microsoft.exchange.webservices.data.core.ExchangeService.updateItem(ExchangeService.java:762) at microsoft.exchange.webservices.data.core.service.item.Item.internalUpdate(Item.java:279) at microsoft.exchange.webservices.data.core.service.item.Appointment.update(Appointment.java:421) at

ramesharana commented 4 years ago

microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The operation can't be performed because the item is out of date. Reload the item and try again. 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.internalUpdateItems(ExchangeService.java:691) at microsoft.exchange.webservices.data.core.ExchangeService.updateItem(ExchangeService.java:762) at microsoft.exchange.webservices.data.core.service.item.Item.internalUpdate(Item.java:279) at microsoft.exchange.webservices.data.core.service.item.Appointment.update(Appointment.java:421) at com.successfactors.rcminterviewschedule.util.EWSMeetingSender.createOrUpdateMeetingForInterviewer(EWSMeetingSender.java:444) at com.successfactors.rcminterviewschedule.util.EWSMeetingSender.send(EWSMeetingSender.java:209) at com.successfactors.platform.bean.AbstractMailSender.sendMail(AbstractMailSender.java:238) at com.successfactors.rcmcommon.util.RCMNotifyMsgMail.callEWSMeetingSenderToSendInvite(RCMNotifyMsgMail.java:291) at com.successfactors.rcmcommon.util.RCMNotifyMsgMail.processRequest(RCMNotifyMsgMail.java:198) at com.successfactors.platform.service.MailConsumerMDB.onMessage(MailConsumerMDB.java:96) at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:744) at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:682) at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:649) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1168) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1160) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1057) at java.lang.Thread.run(Thread.java:836)

ramesharana commented 4 years ago

We are getting this error every 3 out of 10 times.

best-team-bsuir commented 4 years ago

How did you solve the problem?

VirtualFox0 commented 4 years ago

We use ews-java-api (version 2.0) to send mails with attachments. Sometimes this error occurs:

The operation can't be performed because the item is out of date. Reload the item and try again.
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: 
The operation can't be performed because the item is out of date. Reload the item and try again. 
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.sendItem(ExchangeService.java:789) 
at microsoft.exchange.webservices.data.core.service.item.EmailMessage.internalSend(EmailMessage.java:156) 
at microsoft.exchange.webservices.data.core.service.item.EmailMessage.send(EmailMessage.java:258)
[...] 

Did anyone solve the problem?

wangyingzhao commented 4 years ago

I encountered the same situation,and create async job to retry,success

wangyingzhao commented 4 years ago

And I found a pattern,do not use multithreading ,it ok