NHibernate: No persister for: U_SHOP.Entity.Domain.Address解决方案

简介:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: NHibernate.MappingException: No persister for: U_SHOP.Entity.Domain.Address

Source Error: 

Line 30:         public long InsertAddress(Entity.Domain.Address ad)
Line 31:         {
Line 32:            long result=Convert.ToInt64(Session.Save(ad));
Line 33:             Session.Flush();
Line 34:             return result;

Source File: G:\U-Shop\Code\U-SHOP.DAL.SQLServerImpl\AddressBookSqlDAO.cs     Line: 32

 

解决方案:

XML文件的默认生成操作为“内容”,需要修改为“嵌入的资源”生成

 










本文转自 灵动生活 51CTO博客,原文链接:http://blog.51cto.com/smartlife/510198,如需转载请自行联系原作者

目录
相关文章
|
21天前
|
Java 数据库连接
错误org.hibernate.AnnotationException: No identifier specified for entity
请根据你的实际情况,将实体类中的字段和注解进行适当的调整,以确保每个实体类都有一个明确定义的标识符(主键)。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
16 0
|
6月前
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
Service group - get entity set
Created by Wang, Jerry on Jan 12, 2015
75 0
Service group - get entity set
|
Java 数据库连接
hibernate提示Unknown entity: :xxx
错误提示: org.hibernate.MappingException: Unknown entity: org.dao.po.Role at org.hibernate.internal.SessionFactoryImpl.
2154 0
|
关系型数据库 MySQL
|
关系型数据库 Java 数据库连接
spring 整合hibernate注解时候,出现“Unknown entity: com.ssh.entry.Admin; nested exception is org.hibernate.MappingException: Unknown entity: com.ssh.entry.Admin
今天学习使用ssh框架的时候,出现一个异常,弄了好久才找到,在这记录一下,我的sb错误1.spring整合hibernate,取代*.hbm.xml配置文件   在applicationContext.
2312 0

热门文章

最新文章