I hope anyone could help me. I'm building a web client email using the EWS Java API.
This is the code snippet that throws the exception:
if (mailList != null){
for (Item item : mailList.getItems()){
synchronized (item) {
es = Utils.initiateExchangeService(mailAccountData);
em = EmailMessage.bind(es, item.getId(), emPropSet);
item.load(new PropertySet(BasePropertySet.FirstClassProperties));
The line that throws the exception is:
item.load(new PropertySet(BasePropertySet.FirstClassProperties));
I know that this exception is usually get thrown while we use the same instance of the ExchangeService class, but not here.
appreciate any help