NServiceBus/NServiceBus — Issue #203: Exception when using the NinjectBuilder
Author: TrevorPilley
Created: 2012-02-28 15:55:33+00:00
State: open

The following exception is thrown when a message is received, the message mutators and handlers are still called so I don't know if this is actually something that we should be concerned about or nor.

WARN NServiceBus.Unicast.Transport.Transactional.TransactionalTransport - Failed raising 'transport message received' event for message with ID=aecf8375-899f-464a-8a22-9bf056be1c0a\63494
System.NullReferenceException: Object reference not set to an instance of an object.
at Ninject.Injection.DynamicMethodInjectorFactory.EmitMethodCall(ILGeneratoril, MethodInfo method) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Injection\DynamicMethodInjectorFactory.cs:line 130
at Ninject.Injection.DynamicMethodInjectorFactory.Create(PropertyInfo property) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Injection\DynamicMethodInjectorFactory.cs:line 78
at Ninject.Planning.Strategies.PropertyReflectionStrategy.Execute(IPlan plan)
in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Planning\Strategies\PropertyReflectionStrategy.cs:line 61
at Ninject.Planning.Planner.<>c__DisplayClass3.b__1(IPlanningStrategy s) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Planning\Planner.cs:line 68
at Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map[T](IEnumerable`1 series, Action`1 action) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Infrastructure\Language\ExtensionsForIEnumerableOfT.cs:line 23
at Ninject.Planning.Planner.GetPlan(Type type) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Planning\Planner.cs:line 68
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Providers\StandardProvider.cs:line 74
at Ninject.Activation.Context.Resolve() in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Context.cs:line 157
at Ninject.KernelBase.b__7(IContext context) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\KernelBase.cs:line 375
at System.Linq.Enumerable.<>c__DisplayClass12`3.b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at Ninject.Planning.Targets.Target`1.GetValue(Type service, IContext parent)
in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Planning\Targets\Target.cs:line 179
at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Planning\Targets\Target.cs:line 147
at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Providers\StandardProvider.cs:line 97
at Ninject.Activation.Providers.StandardProvider.<>c__DisplayClass2.b__1(ITarget target) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Providers\StandardProvider.cs:line 81
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Providers\StandardProvider.cs:line 81
at Ninject.Activation.Context.Resolve() in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Context.cs:line 157
at Ninject.KernelBase.b__7(IContext context) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\KernelBase.cs:line 375
at System.Linq.Enumerable.<>c__DisplayClass12`3.b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Ninject.ResolutionExtensions.Get(IResolutionRoot root, Type service, IParameter[] parameters) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:line 151
at NServiceBus.ObjectBuilder.Ninject.NinjectObjectBuilder.<>c__DisplayClass5.b__3(IContext ctx)
at Ninject.Activation.Providers.CallbackProvider`1.CreateInstance(IContext context)
in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Providers\CallbackProvider.cs:line 45
at Ninject.Activation.Provider`1.Create(IContext context) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Provider.cs:line 39
at Ninject.Activation.Context.Resolve() in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\Activation\Context.cs:line 157
at Ninject.KernelBase.b__7(IContext context) in c:\Projects\Ninject\Maintenance2.2\ninject\src\Ninject\KernelBase.cs:line 375
at System.Linq.Enumerable.<>c__DisplayClass12`3.b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.d__1`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NServiceBus.Unicast.UnicastBus.HandleTransportMessage(IBuilder childBuilder, TransportMessage msg)
at NServiceBus.Unicast.UnicastBus.TransportMessageReceived(Object sender, TransportMessageReceivedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTransportMessageReceived(TransportMessage msg)