为什么总是提示找不到,我用Annotation 还能运行不会报错但是用xml这种就不能运行为什么???这是hibernate.cfg.xml<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration>    <session-factory>
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="connection.url">jdbc:mysql://localhost:3306/mysql</property>
        <property name="connection.username">root</property>
        <property name="connection.password">meng</property>
        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="show_sql">true</property>
        <property name="format_sql">true</property>
        <property name="hbm2ddl.auto">update </property>
   
        <property name="current_session_context_class">thread</property>
        
                       <!--这是实例  -->
     <!--  <mapping   class="com.menglei.shili.Categroy"  />
      <mapping   class="com.menglei.shili.Topic"  />
      <mapping   class="com.menglei.shili.Msg"  />     -->
 
      <mapping   resource="com.menglei.shili/msg.hbm.xml" />
      <mapping   resource="com.menglei.shili/categroy.hbm.xml" />
     <mapping   resource="com.menglei.shili/topic.hbm.xml" />   
    </session-factory></hibernate-configuration>
这是msg.hbm.xml<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
      <class name="com.menglei.shili.Msg"  table="msg"   >
           <id   name="id"  >
             <column  name="id"   />
           
           </id>
           
           <property name="count" type="java.lang.String">
               <column  name="count"  length="10"  not-null="true"/>
           </property>
           
           <many-to-one   name="topic" class="com.menglei.shili.Topic"   column="topic_Id"/>
      </class></hibernate-mapping>
这是topic.hbm.xml<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
      <class name="com.menglei.shili.Topic"  table="topic"  >
           <id   name="id"  >
             <column  name="id"   />
             <generator   class="identity">
         
             </generator>
           </id>
           
           <property name="name"  >
               <column  name="name"  length="10"  not-null="true"/>
           </property>
           <property name="date"  column="date_time"></property>
     <many-to-one  name="categroy" class="com.menglei.shili.Topic"  column="Cid"></many-to-one>
          
      </class></hibernate-mapping>
这是categroy.hbm.xml<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
      <class name="com.menglei.shili.Categroy"  table="categroy"  >
           <id   name="id"    >
              <column  name="id"  />
              <generator class="identity"/>
             
           </id>
           
           <property name="name" type="java.lang.String">
               <column  name="name"  length="10"  not-null="true"/>
           </property>
           
           
      </class></hibernate-mapping>