ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

microsoft.exchange.webservices.data.ServiceResponseException: Object cannot be deleted

Open aquav opened this issue 10 years ago • 2 comments

Hi We are using ews-java-api version 1.2. We are getting this exception on deletion of email during load test. Our application perform four steps:-

  1. Read email
  2. Process them (downloading attachment etc)
  3. Send an automated Response
  4. Delete emails

We have observed that during load test, where we have processed almost 4000 emails in 4 hours with variation of 300 emails/hr to 1500 emails/hr. we have started receiving this exception on last hour and just after step 3 i.e. after sending the response. All emails sent on first 3 hours were deleted successfully.

Also we were running this load test from 4 threads concurrently.

Here is exception trace:-

Caused by: microsoft.exchange.webservices.data.ServiceResponseException: Object cannot be deleted.
    at microsoft.exchange.webservices.data.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:266) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.ServiceResponse.throwIfNecessary(ServiceResponse.java:254) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:152) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.ExchangeService.internalDeleteItems(ExchangeService.java:1472) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.ExchangeService.deleteItem(ExchangeService.java:1523) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.Item.internalDelete(Item.java:192) ~[ews-api-1.2.3.jar:na]
    at microsoft.exchange.webservices.data.Item.delete(Item.java:328) ~[ews-api-1.2.3.jar:na]

I don't see any issue in application or ews code. I am assuming there might be a limit on hard delete in a certain time range set by exchange. I will check with exchange admin and update here, if I get an answer.

Please help if you have any experience facing this issue. Thanks in advance.

aquav avatar Apr 23 '15 19:04 aquav

@aquav thanks for the report. It would also be interesting if this error also occurs when you run your load test against the current 2.0 api.

serious6 avatar Apr 24 '15 08:04 serious6

Hi, I am facing this same error as well, using version 2.0.

For our case, after a linux patching on our servers, one of our mailboxes were unable to delete its mails with this error appearing, another mailbox seems to be able to delete.

Sorry I can't post the logs due to data restriction policy in my company, but our logs are similar to OP's apart from the stack trace which we did not log. Would greatly appreciate any clues/help on this, thanks!

shiroikumakoori avatar Feb 15 '22 01:02 shiroikumakoori