对象 is not mapped

04/29

遇到  XX类 is not mapped 。

但我的src/hibernate.cfg.xml中已经配置。

原因是test/hibernate.cfg.xml中未配置,而项目启动时认为的classPath是test目录。

修改.myhibernate的configFile指向正确的,并重新布署就行了。

注在.classpath文件中可以看到test的kind 是src

猜你喜欢

转载自wayjava.iteye.com/blog/1024647