Friday, 5 April 2013

Object reference during NServiceBus start up.

One of our NServiceBus services started getting this error today.

Fatal    System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Object.GetType()
   at NServiceBus.Timeout.Core.TimeoutRunner.CacheExistingTimeouts()
   at NServiceBus.Timeout.Core.TimeoutRunner.Run()
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction)
   at NServiceBus.Hosting.GenericHost.Start() in c:\TeamCity\buildAgent\work\nsb.master_8\src\hosting\NServiceBus.Hosting\GenericHost.cs:line 34

Turns out the NServiceBus.Persistence connection string was pointing to a Raven instance that was turned off.

Friday, 29 March 2013

NServiceBus Testing with Unobtrusive messages

I’ve just had a problem when using nServiceBus.Testing.

When I was running my unit test i was getting
image

Turns out this service was using unobtrusive messages and it appears that nServiceBus.Testing isn’t aware of that and there doesn’t seem to be a way to make it aware.  Currently I’ve just added IMessage to my messages.

NServiceBus config errors

If you get an error about logging when starting a nservice bus service drill down on the exception to see what the real error is.

Tuesday, 25 September 2012

Get the value of an adjacent cell with jQuery

   1:   var row = $(this).closest('tr');
   2:   var description = row.find('td:eq(1)').text();
   3:   var code = row.find('td:eq(0)').text();

Thursday, 16 August 2012

Using IMappingEngine with Castle Windsor

I must remember this

container.Register(Component.For<IMappingEngine>().UsingFactoryMethod(()=> Mapper.Engine));


From http://stackoverflow.com/questions/1719725/inject-automapper

Saturday, 14 July 2012

Stop EF looking for migration tables

I keep forgetting how to do this should I’ll post it here.

Database.SetInitializer<DataContext>(null);