MPExtended/MPExtended — Issue #165: Do not make whole service unavailable when a MAS provider is buggy
Author: oxan
Created: 2012-01-27 17:23:59+00:00
State: open
Labels: mas, plugins

```
2012-01-26 16:24:33.2968 [(13)] ERROR: Unhandled exception in service (SOAP interface)
(ErrorBehavior.ProvideMessageFaultCore => ErrorBehavior.ProvideFault => SoapExceptionHandling.ProvideFault)
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) The given key was not present in the dictionary.

Resulting in: An exception occurred while trying to create an instance of type 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures'.

Resulting in: Cannot activate part 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures'.
Element: MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures --> MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures --> DirectoryCatalog (Path="c:\Programme\MPExtended\Service\Extensions")

Resulting in: Cannot get export 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures (ContractName="MPExtended.Services.MediaAccessService.Interfaces.IMovieLibrary")' from part 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures'.
Element: MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures (ContractName="MPExtended.Services.MediaAccessService.Interfaces.IMovieLibrary") --> MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures --> DirectoryCatalog (Path="c:\Programme\MPExtended\Service\Extensions")

at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at lambda_method(Closure , Lazy`2 )
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MPExtended.Services.MediaAccessService.LazyLibraryList`1.GetAllAsBackendProvider()
at MPExtended.Services.MediaAccessService.MediaAccessService.GetServiceDescription()
at SyncInvokeGetServiceDescription(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
2012-01-26 16:24:43.3281 [(8)] ERROR: Unhandled exception in service (SOAP interface)
(ErrorBehavior.ProvideMessageFaultCore => ErrorBehavior.ProvideFault => SoapExceptionHandling.ProvideFault)
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Could not finishing composing object of type 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures'. The import 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures..ctor (Parameter="data", ContractName="MPExtended.Services.MediaAccessService.Interfaces.IPluginData")' was not satisfied.

Resulting in: Cannot get export 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures (ContractName="MPExtended.Services.MediaAccessService.Interfaces.IMovieLibrary")' from part 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures'.
Element: MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures (ContractName="MPExtended.Services.MediaAccessService.Interfaces.IMovieLibrary") --> MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures --> DirectoryCatalog (Path="c:\Programme\MPExtended\Service\Extensions")

at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at lambda_method(Closure , Lazy`2 )
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MPExtended.Services.MediaAccessService.LazyLibraryList`1.GetAllAsBackendProvider()
at MPExtended.Services.MediaAccessService.MediaAccessService.GetServiceDescription()
at SyncInvokeGetServiceDescription(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
2012-01-26 16:24:55.2812 [(14)] ERROR: Unhandled exception in service (SOAP interface)
(ErrorBehavior.ProvideMessageFaultCore => ErrorBehavior.ProvideFault => SoapExceptionHandling.ProvideFault)
System.InvalidOperationException: GetExportedValue cannot be called before prerequisite import 'MPExtended.PlugIns.MAS.MovingPictures.MPMovingPictures..ctor (Parameter="data", ContractName="MPExtended.Services.MediaAccessService.Interfaces.IPluginData")' has been set.
at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.EnsureGettable()
at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.GetExportedValue(ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at lambda_method(Closure , Lazy`2 )
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MPExtended.Services.MediaAccessService.LazyLibraryList`1.GetAllAsBackendProvider()
at MPExtended.Services.MediaAccessService.MediaAccessService.GetServiceDescription()
at SyncInvokeGetServiceDescription(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
```

Needs some changes in LazyLibraryList.