本帖最后由 winner1014840718 于 2012-03-16 00:07:38 编辑

解决方案 »

  1.   

    <property name="name"></property>
    <property name="age"></property>这两句没写column
      

  2.   

    我的Student.hbm.xml
    <?xml version="1.0"?>
    <!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.hibernate.Student" table="Student">
            <id name="sid" column="ID_">
                <generator class="native"/>
            </id>
            <property name="uname" />
            <property name="age"/>
          
          
        </class>   </hibernate-mapping>
      

  3.   

    是不是你的Student.hbm.xml文件和你的Student类里面的属性不匹配。。让eclipse无法解析通过
      

  4.   

    是不是hibernate,cfg.xml中没有
    <mapping resource="../Student.hbm.xml"/>
      

  5.   

    贴出你hiberenate的配置文件出来。