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

Cannot obtain cancel meeting notification using (streaming) event notifications API

Open indriesergiu opened this issue 10 years ago • 2 comments

Hi,

I'm using the streaming API to listen for meeting events and everything seems to be working except for cancelled meeting events. When a meeting is cancelled I generally receive multiple ItemEvents and one FolderEvent however when I try to bind the item id to an Item

if (event instanceof ItemEvent) 
        Item item = Item.bind(service, ((ItemEvent) event).getItemId());

I get one of the following errors

The specified object was not found in the store.

and

Access is denied. 

Read access is granted on the meeting room calendar (without it I cannot receive meeting created & updated events) using the following Powershell command

Add-MailboxFolderPermission -Identity <room email>:\Calendar -User <user email> -AccessRights Readitems

The event types I subscribe for are EventType.Modified, EventType.Created, EventType.Deleted, EventType.FreeBusyChanged, EventType.Moved.

The above commands are run against a local exchange server. I've also tried running them in Office365 and got something very similar (but uglier)

The specified object was not found in the store., Microsoft.Exchange.Data.Storage.ObjectNotFoundException: The process failed to get the correct properties. ---> Microsoft.Mapi.MapiExceptionNotFound: MapiExceptionNotFound: Unable to get properties on object. (hr=0x8004010f, ec=-2147221233)
Diagnostic context:
    Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=1346]
    Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=234][latency=0]
    Lid: 52176   ClientVersion: 15.1.337.19
    Lid: 50032   ServerVersion: 15.1.337.6019
    Lid: 35180  
    Lid: 23226   --- ROP Parse Start ---
    Lid: 27962   ROP: ropOpenMessage [3]
    Lid: 17082   ROP Error: 0x8004010F
    Lid: 26977  
    Lid: 21921   StoreEc: 0x8004010F
    Lid: 27962   ROP: ropExtendedError [250]
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 50428  
    Lid: 59416   StoreEc: 0x8004010F
    Lid: 38536  
    Lid: 10786   dwParam: 0x0        Msg: 15.01.0337.013:DB3PR06MB186
    Lid: 1750    ---- Remote Context End ----
    Lid: 27962   ROP: ropGetPropsSpecific [7]
    Lid: 17082   ROP Error: 0x4B9     
    Lid: 26465  
    Lid: 21921   StoreEc: 0x4B9     
    Lid: 31418   --- ROP Parse Done ---
    Lid: 22753  
    Lid: 21817   ROP Failure: 0x4B9     
    Lid: 20385  
    Lid: 28577   StoreEc: 0x8004010F
    Lid: 32001  
    Lid: 29953   StoreEc: 0x8004010F
    Lid: 32768  
    Lid: 33024   StoreEc: 0x8004010F
   at Microsoft.Mapi.MapiExceptionHelper.InternalThrowIfErrorOrWarning(String message, Int32 hresult, Boolean allowWarnings, Int32 ec, DiagnosticContext diagCtx, Exception innerException)
   at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, IExInterface iUnknown, Exception innerException)
   at Microsoft.Mapi.MapiProp.GetProps(ICollection`1 propTagsRequested)
   at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions)
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag.InternalLoad(ICollection`1 extraProperties)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag..ctor(StoreSession session, MapiProp mapiProp, ICollection`1 autoloadProperties, Boolean canSaveOrDisposeMapiProp)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag..ctor(StoreSession session, MapiProp mapiProp, ICollection`1 autoloadProperties)
   at Microsoft.Exchange.Data.Storage.ItemBuilder.CoreItemBind(StoreSession session, StoreId storeId, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, StoreObjectType& storeObjectType)
   at Microsoft.Exchange.Data.Storage.ItemBuilder.ItemBind[T](StoreSession session, StoreId storeId, Schema expectedSchema, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, ItemCreateInfo itemCreateInfo)
   at Microsoft.Exchange.Data.Storage.Item.Bind(StoreSession session, StoreId storeId, ItemBindOption itemBindOption, ICollection`1 propsToReturn)
   at Microsoft.Exchange.Data.Storage.Item.BindWithFallbackSearch(StoreSession session, StoreId storeId, String internetMessageId, ICollection`1 propsToReturn, Boolean& didFallbackSearch)
   at Microsoft.Exchange.Services.Core.ServiceCommandBase.GetXsoItem(StoreSession session, StoreId id, String internetMessageId, PropertyDefinition[] properties)
   at Microsoft.Exchange.Services.Core.GetItem.GetItemObject(IdAndSession idAndSession, Item& xsoItem, ServiceError& warning)
   at Microsoft.Exchange.Services.Core.GetItem.<>c__DisplayClass1.<Execute>b__0()
   at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)
   at Microsoft.Exchange.Services.Core.GetItem.Execute()
   at Microsoft.Exchange.Services.Core.ExceptionHandler`1.Execute(CreateServiceResult createServiceResult, Int32 index, GenerateMessageXmlForServiceError generateErrorXml)

and

Access is denied. Check credentials and try again., Microsoft.Exchange.Data.Storage.AccessDeniedException: The process failed to get the correct properties. ---> Microsoft.Mapi.MapiExceptionNoAccess: MapiExceptionNoAccess: Unable to get properties on object. (hr=0x80070005, ec=-2147024891)
Diagnostic context:
    Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=1352]
    Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=254][latency=0]
    Lid: 52176   ClientVersion: 15.1.337.19
    Lid: 50032   ServerVersion: 15.1.337.6019
    Lid: 35180  
    Lid: 23226   --- ROP Parse Start ---
    Lid: 27962   ROP: ropOpenMessage [3]
    Lid: 17082   ROP Error: 0x80070005
    Lid: 26977  
    Lid: 21921   StoreEc: 0x80070005
    Lid: 27962   ROP: ropExtendedError [250]
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 46439   dwParam: 0xA
    Lid: 58216   dwParam: 0x0
    Lid: 46439   StoreEc: 0x80070005
    Lid: 63016   dwParam: 0x3
    Lid: 39640   StoreEc: 0x80070005
    Lid: 10786   dwParam: 0x0        Msg: 15.01.0337.013:DB3PR06MB186
    Lid: 1750    ---- Remote Context End ----
    Lid: 27962   ROP: ropGetPropsSpecific [7]
    Lid: 17082   ROP Error: 0x4B9     
    Lid: 26465  
    Lid: 21921   StoreEc: 0x4B9     
    Lid: 31418   --- ROP Parse Done ---
    Lid: 22753  
    Lid: 21817   ROP Failure: 0x4B9     
    Lid: 20385  
    Lid: 28577   StoreEc: 0x80070005
    Lid: 32001  
    Lid: 29953   StoreEc: 0x80070005
    Lid: 32768  
    Lid: 33024   StoreEc: 0x80070005
   at Microsoft.Mapi.MapiExceptionHelper.InternalThrowIfErrorOrWarning(String message, Int32 hresult, Boolean allowWarnings, Int32 ec, DiagnosticContext diagCtx, Exception innerException)
   at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, IExInterface iUnknown, Exception innerException)
   at Microsoft.Mapi.MapiProp.GetProps(ICollection`1 propTagsRequested)
   at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions)
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag.InternalLoad(ICollection`1 extraProperties)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag..ctor(StoreSession session, MapiProp mapiProp, ICollection`1 autoloadProperties, Boolean canSaveOrDisposeMapiProp)
   at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag..ctor(StoreSession session, MapiProp mapiProp, ICollection`1 autoloadProperties)
   at Microsoft.Exchange.Data.Storage.ItemBuilder.CoreItemBind(StoreSession session, StoreId storeId, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, StoreObjectType& storeObjectType)
   at Microsoft.Exchange.Data.Storage.ItemBuilder.ItemBind[T](StoreSession session, StoreId storeId, Schema expectedSchema, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, ItemCreateInfo itemCreateInfo)
   at Microsoft.Exchange.Data.Storage.Item.Bind(StoreSession session, StoreId storeId, ItemBindOption itemBindOption, ICollection`1 propsToReturn)
   at Microsoft.Exchange.Data.Storage.Item.BindWithFallbackSearch(StoreSession session, StoreId storeId, String internetMessageId, ICollection`1 propsToReturn, Boolean& didFallbackSearch)
   at Microsoft.Exchange.Services.Core.ServiceCommandBase.GetXsoItem(StoreSession session, StoreId id, String internetMessageId, PropertyDefinition[] properties)
   at Microsoft.Exchange.Services.Core.GetItem.GetItemObject(IdAndSession idAndSession, Item& xsoItem, ServiceError& warning)
   at Microsoft.Exchange.Services.Core.GetItem.<>c__DisplayClass1.<Execute>b__0()
   at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)
   at Microsoft.Exchange.Services.Core.GetItem.Execute()
   at Microsoft.Exchange.Services.Core.ExceptionHandler`1.Execute(CreateServiceResult createServiceResult, Int32 index, GenerateMessageXmlForServiceError generateErrorXml)

Any ideas?

Thanks, Sergiu

indriesergiu avatar Dec 07 '15 10:12 indriesergiu

we seem to be having this same problem which is confusing because i believe using the older version of the lib this worked

kentongray avatar May 02 '16 16:05 kentongray

Also having this problem

MarkRBM avatar May 02 '16 17:05 MarkRBM