这是的配置文件
<hibernate-mapping>
  <class name="com.bookstore.object.Product" table="product">  
   <cache usage="nonstrict-read-write"/>
<id name="productId" column="productId" type="string" unsaved-value="null">
      <generator class="assigned"/>
    </id>
   <property name="productName" column="productName" type="string"/>
    <property name="description" column="description" type="string"/>
    <property name="categoryId" column="category" type="string"/>
  </class>  
</hibernate-mapping>

解决方案 »

  1.   

    org.web.object.Product    com.bookstore.object.Product
      

  2.   

    sorry 包名是一致的 我发错了
      

  3.   

    <hibernate-configuration>    <session-factory>
            <property name="connection.username">root</property>
            <property name="connection.url">jdbc:mysql://localhost:3306/ebookstore</property>
            <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
            <property name="connection.password">1234</property>
            <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
         <mapping resource="CategoryImp.hbm.xml"/>
            <mapping resource="ItemImp.hbm.xml"/>
            
            <mapping resource="OrderImp.hbm.xml"/>
            <mapping resource="ProductImp.hbm.xml"/>
            <mapping resource="AccountImp.hbm.xml"/>
            <mapping resource="OrderItemImp.hbm.xml"/>    </session-factory></hibernate-configuration>
      

  4.   

    是不是找不到映射文件啊
    <mapping resource="OrderItemImp.hbm.xml"/>
    这里改成绝对路径试试
      

  5.   

    你的mssql没有打补丁!
    你下个sp4
    就好了