首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

org.hibernate.MappingException: Resource: Person.hbm.xml not found解决方法!

2014-01-26 
org.hibernate.MappingException: Resource: Person.hbm.xml not found解决方法:代码: hibernate.cfg.xml:

org.hibernate.MappingException: Resource: Person.hbm.xml not found解决方法:

代码:
hibernate.cfg.xml:
&#65279; <?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN "
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd ">

<hibernate-configuration>
<session-factory >

<!-- local connection properties -->
<property name= "hibernate.connection.url "> jdbc:mysql://133.124.42.55:3306/webshow?characterEncoding=gb2312&amp;useUnicode=true </property>
<property name= "hibernate.connection.driver_class "> org.gjt.mm.mysql.Driver </property>
<property name= "hibernate.connection.username "> root </property>
<property name= "hibernate.connection.password "> </property>
<!-- property name= "hibernate.connection.pool_size "> </property -->

<!-- dialect for MySQL -->
<property name= "dialect "> org.hibernate.dialect.MySQLDialect </property>

<property name= "hibernate.show_sql "> false </property>
<property name= "hibernate.transaction.factory_class "> org.hibernate.transaction.JDBCTransactionFactory </property>

<mapping resource= "Person.hbm.xml "/>
</session-factory>

</hibernate-configuration>

------解决方法--------------------------------------------------------
<mapping resource= "Person.hbm.xml "/>
这里出了问题,你这里应该加上包名person

        

热点排行