Nhibernate.Search не может создать экземпляр поставщика каталогов - PullRequest
1 голос
/ 10 июля 2009

Я пытаюсь использовать NHibernate.Search вместе с CastleProjects ActiveRecord, как описано здесь http://using.castleproject.org/display/AR/Using+NHibernate.Search+with+ActiveRecord

но я получаю следующую ошибку, как только я украшаю первый объект бизнеса с индексированным атрибутом

Zeile 135:                  sessFactory = cfg.BuildSessionFactory();

[TypeLoadException: Der Typ "NHibernate.Search.Storage.FSDirectoryProvider" in der Assembly "NHibernate.Search, Version=2.0.0.1001, Culture=neutral, PublicKeyToken=407dd0808d44fbdc" konnte nicht geladen werden.]
   System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
   System.Reflection.Assembly.GetType(String name, Boolean throwOnError) +36
   NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName name, Boolean throwOnError) +698
   NHibernate.Util.ReflectHelper.ClassForName(String name) +92
   NHibernate.Search.Store.DirectoryProviderFactory.CreateDirectoryProvider(String directoryProviderName, IDictionary`2 indexProps, ISearchFactoryImplementor searchFactoryImplementor) +150

[HibernateException: Unable to instantiate directory provider: NHibernate.Search.Storage.FSDirectoryProvider, NHibernate.Search]
   NHibernate.Search.Store.DirectoryProviderFactory.CreateDirectoryProvider(String directoryProviderName, IDictionary`2 indexProps, ISearchFactoryImplementor searchFactoryImplementor) +263
   NHibernate.Search.Store.DirectoryProviderFactory.CreateDirectoryProviders(Type entity, Configuration cfg, ISearchFactoryImplementor searchFactoryImplementor) +368
   NHibernate.Search.Impl.SearchFactoryImpl.InitDocumentBuilders(Configuration cfg, Analyzer analyzer) +274
   NHibernate.Search.Impl.SearchFactoryImpl..ctor(Configuration cfg) +302
   NHibernate.Search.Impl.SearchFactoryImpl.GetSearchFactory(Configuration cfg) +222
   NHibernate.Search.Event.FullTextIndexEventListener.Initialize(Configuration cfg) +53
   NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg, Object[] list) +181
   NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg) +437
   NHibernate.Cfg.Configuration.GetInitializedEventListeners() +90
   NHibernate.Cfg.Configuration.BuildSessionFactory() +153
   Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory(Type type) in c:\VS2008\CastleProject\ActiveRecord\Castle.ActiveRecord\Framework\SessionFactoryHolder.cs:135
   Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateScopeSession(Type type) in c:\VS2008\CastleProject\ActiveRecord\Castle.ActiveRecord\Framework\SessionFactoryHolder.cs:296
   Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession(Type type) in c:\VS2008\CastleProject\ActiveRecord\Castle.ActiveRecord\Framework\SessionFactoryHolder.cs:182
   Castle.ActiveRecord.ActiveRecordBase.FindAll(Type targetType, DetachedCriteria detachedCriteria, Order[] orders) in c:\VS2008\CastleProject\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordBase.cs:947
   Castle.ActiveRecord.ActiveRecordMediator.FindAll(Type targetType, DetachedCriteria detachedCriteria, Order[] orders) in c:\VS2008\CastleProject\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordMediator.cs:213
   HrmSuite.DataAccess.Generic.PtaDao`1._FindByCriteria(DetachedCriteria criteria, Order[] orders) in C:\VS2008\HrmSuite\HrmSuite.DataAccess\Generic\PtaDao.vb:509
   HrmSuite.DataAccess.Generic.PtaDao`1.FindByCriteria(DetachedCriteria criteria, Order[] orders) in C:\VS2008\HrmSuite\HrmSuite.DataAccess\Generic\PtaDao.vb:618
   HrmSuite.MvcWebClient.UserFactory.GetByIdentity(IIdentity identity) in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Models\Factories\UserFactory.vb:29
   HrmSuite.MvcWebClient.Singelton.get_SessionUser() in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Models\Singelton.vb:273
   HrmSuite.MvcWebClient.DaoFactory.CreateDao() in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Models\Factories\DaoFactory.vb:9
   HrmSuite.MvcWebClient.VacancyFactory.GetOpenVacancyCount() in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Models\Factories\VacancyFactory.vb:54
   HrmSuite.MvcWebClient.ApplicationController..ctor() in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Controllers\ApplicationController.vb:9
   HrmSuite.MvcWebClient.EmployeeController..ctor() +43

[TypeLoadException: Der Typ "NHibernate.Search.Storage.FSDirectoryProvider" in der Assembly "NHibernate.Search, Version=2.0.0.1001, Culture=neutral, PublicKeyToken=407dd0808d44fbdc" konnte nicht geladen werden.]

означает

NHibernate.Search.Storage.FSDirectoryProvider не может быть загружен я уже пытался использовать RAMDirectoryProvider, но ошибка осталась

Я использую ствол замкового проекта

1 Ответ

2 голосов
/ 10 июля 2009

FSDirectoryProvider находится в пространстве имен NHibernate.Search.Store, а не в NHibernate.Search.Storage.

Не знаю, где неправильная ссылка.

...