Archive for July 2012

Rhino Servicebus Error: Can’t create component ‘Rhino.ServiceBus.Msmq.MsmqTransport’ as it has dependencies to be satisfied.

July 5, 2012
Library Versions:
  • Castle Windsor 3.0.0
  • Rhino.Servicebus 2.3.3.0
When using Rhino Servicebus, as typical configuration looks as follows:
public class ModuleInstaller: IWindsorInstaller
{
  public void Install(IWindsorContainer container, IConfigurationStore store)
  {
    new RhinoServiceBusConfiguration()
   .UseCastleWindsor(container)
   .Configure();

   container.Resolve().Start();

 }
}
However when this runs I get the following error:
Can’t create component ‘Rhino.ServiceBus.Msmq.MsmqTransport’ as it has dependencies to be satisfied.

‘Rhino.ServiceBus.Msmq.MsmqTransport’ is waiting for the following dependencies:
– Service ‘Rhino.ServiceBus.Serializers.XmlMessageSerializer’ which was registered but is also waiting for dependencies.- Service ‘Rhino.ServiceBus.Msmq.TransportActions.IMsmqTransportAction[]’ which was not registered.
– Service ‘Rhino.ServiceBus.Impl.EndpointRouter’ which was registered but is also waiting for dependencies.- Service ‘Rhino.ServiceBus.Msmq.MsmqMessageBuilder’ which was registered but is also waiting for dependencies.
‘Rhino.ServiceBus.Msmq.MsmqMessageBuilder’ is waiting for the following dependencies:
– Service ‘Rhino.ServiceBus.Serializers.XmlMessageSerializer’ which was registered but is also waiting for dependencies. 

This error confused me for some time, particularly because Castle Windsor reported that these components (like the XmlMessageSerializer) were registered correctly and could be resolved.

After searching long and hard and by pure chance, I stumbled across the solution: simply add the TypedFactoryFacility to the Castle Windsor installation. This works like a dream and the bus starts without error.

Advertisements