Nhibernate.Search 无法实例化目录提供程序
我正在尝试将 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 但错误仍然存在
我正在使用 castleproject trunk
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FSDirectoryProvider< /a> 位于 NHibernate.Search.Store 命名空间中,而不是位于 NHibernate.Search.Storage 中。
但不知道哪里有错误的参考。
FSDirectoryProvider is in the NHibernate.Search.Store namespace, not in NHibernate.Search.Storage.
Don't know where's the wrong reference though.