views:

337

answers:

1

Up until recently I had a working service using NHibernate 2.0. I have upgraded to 2.1, but now try to instantiate the ItemManager:

IItemManager manager = Container.Instance.Resolve<IItemManager>();

I get an exception:

Castle.MicroKernel.ComponentNotFoundException was unhandled by user code Message="No component for supporting the service Distribution.WMS.OrderManagement.Business.Contracts.IItemManager was found"

The mapping in my windsor config looks like this:

<component
  id="item.manager"
  service="Distribution.WMS.OrderManagement.Business.Contracts.IItemManager, Distribution.WMS.OrderManagement.Business.Contracts"
  type="Distribution.WMS.OrderManagement.Business.Managers.ItemManager, Distribution.WMS.OrderManagement.Business.Managers"
  lifestyle="transient">
  <parameters>
    <repository>${som.item.repository}</repository>
  </parameters>
</component>

IItemManager is in the namespace: Distribution.WMS.OrderManagement.Business.Contracts

Am I missing something simple or is there something else I must do after upgrading?

+1  A: 

I found my answer, not an upgrade related issue. This project depends on a common library that I had to update the NHibernate reference in. Since the last time I got latest someone decided to change where the windsor config file was located so when I got latest and updated my reference it was no longer able to find my config.

Justin Holbrook