应该是找不到Hibernate3.jar的包吧

解决方案 »

  1.   

    找不到Hibernate3.jar,把它放到claspath里面
      

  2.   

    我用的是eclipse+myeclipse的开发环境,都已经把hibernate3的包导入到项目中了...
    那我应该怎样进行设置呢?
      

  3.   

    看在pojo 所在的包下,有没有响应的 .hbm.xml 文件,然后再看,该文件有没有在 hibernate 的配置文件中声明
      

  4.   

    <?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="connection.username">root</property>
    <property name="connection.url">jdbc:mysql://localhost:3306/customer</property>
    <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="myeclipse.connection.profile">Customers_mysql</property>
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <mapping resource="com/hibernate/dao/Customers.hbm.xml" /> ---在这呀! </session-factory></hibernate-configuration>
      

  5.   

    在网上找个简单例子, 看看.hbm.xml
      

  6.   

    com.hibernate.useHibernate.saveCustomers(useHibernate.java:1 
    com.hibernate.struts.action.AddUserAction.execute(AddUserAction.java:56) 
    org.apache.struts.action.RequestProcessor.processActionPerform
    根據這三個,說明妳的Action中齣錯暸,由于妳在action中使用暸調用userHibernate.saveCustomer(),問題齣現在這個saveCustomer()中,這個方法不能通過,
    具體問題就看不齣暸,
      

  7.   

    我该添加的包都已经添加到项目中了!
    还需要添加什么呀?
    我用的是eclipse+myeclipse!!!进行的项目开发。
      

  8.   

    还是需要在eclipse中进行什么样的配置?
      

  9.   

    谢谢!williamy(williamy),你说的这些我都能看明白的!