开发者

No component for supporting the service after upgrading to NHibernate 2.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 开发者_JS百科something else I must do after upgrading?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜