People.hbm.xml加到配置文件里了吗?

解决方案 »

  1.   

    你确定没有改过这几个 .hbm.xml 文件吗?提示是读取 luntan/People.hbm.xml 文件的时候出现异常。把你的hibernate.cfg.xml 贴出来!
      

  2.   

    确实没有改
    -----------------------------------hibernate.properties-----------------------------------hibernate.dialect=net.sf.hibernate.dialect.SQLServerDialect
    hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
    hibernate.connection.url=jdbc:microsoft:sqlserver://Localhost:1433;DatabaseName=Forum;SelectMethod=cursor
    hibernate.connection.username=sa
    hibernate.connection.password=wsnedy
    hibernate.show_sql=true
    hibernate.c3p0.min_size=5
    hibernate.c3p0.max_size=20
    hibernate.c3p0.max_statements=50
    hibernate.c3p0.idle_test_period=3000
      

  3.   

    推荐用hibernate.cfg.xml来配置,用属性文件的话还得要加载类所对应的映射文件。
    检查下你的People和Note映射是怎样加载的?