首页 新闻 赞助 找找看

NHibernate异常

0
悬赏园豆:15 [已关闭问题]

Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle' during configuration of proxy factory class.
Possible causes are:
- The NHibernate.Bytecode provider assembly was not deployed.
- The typeName used to initialize the 'proxyfactory.factory_class'
 

这种异常一般怎么解决?

 

问题补充: 之前的一场在我把方言该为2008的以后就没出现了! 不过却引来了这个异常 Could not compile the mapping document: NHibernateSample.Domain.Mappings.Userinfo.hbm.xml 出现这个异常是在创建会话工厂的时候! 下面的是我的映射文件: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernateSample.Domain" namespace="NHibernateSample.Domain.Entities"> <class name="Userinfo"> <id name="Id" column="ID" type="int"> <generator class="native"/> </id> <property name="Name" column="Name"/> <property name="Sex" column="Sex"/> <property name="Birthday" column="Birthday"/> <property name="RegisterDate" column="RegisterDate"/> </class> </hibernate-mapping>
ClientBoy的主页 ClientBoy | 初学一级 | 园豆:87
提问于:2009-10-29 20:33
< >
分享
其他回答(1)
0
  • 引用NHibernate.ByteCode.Castle.dll程序集
  • 引用NHibernate.ByteCode.LinFu.dll程序集
  • 配置文件也要加节点

       <property name="proxyfactory.factory_class">
            NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu
          </property>

    ulee | 园豆:10 (初学一级) | 2009-10-30 10:01
    你的答案最接近~~给你10分!
    支持(0) 反对(1) ClientBoy | 园豆:87 (初学一级) | 2009-11-03 19:11
    0

    添加程序集NHibernate.ByteCode.Castle的引用

    uncletwo | 园豆:100 (初学一级) | 2009-10-30 13:11
    清除回答草稿
       您需要登录以后才能回答,未注册用户请先注册