views:

337

answers:

1

i am trying to use NHibernate.Search together with CastleProjects ActiveRecord as descriped here http://using.castleproject.org/display/AR/Using+NHibernate.Search+with+ActiveRecord

but i am getting the following error as soon as i decorate the first buisness object with the indexed attribute

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.]

means

NHibernate.Search.Storage.FSDirectoryProvider could not be loaded i already tried using the RAMDirectoryProvider but the error stayed

i am using the castleproject trunk

+2  A: 

FSDirectoryProvider is in the NHibernate.Search.Store namespace, not in NHibernate.Search.Storage.

Don't know where's the wrong reference though.

Mauricio Scheffer
omg that should have been obvious, thx :)
marc.d