环境:weblogic815+oracle10.2
hibernate3.1
错误:在hibernate.cfg.xml 中配置mapping files后运行,weblogic报其中一个mapping file错误,检查后发现在刚建立newclass.hbm.xml文件的时候myeclipse就曾报过错,(
newclass.hbm.xml文件中错误提示:the content of element type "class" must match "(meta*,column*,type?generator?...
)只是当时没有检查出来错误的来源,就没有当回事,这会回过来详细检查后发现,是因为数据库主键问题。
在建立newclass.hbm.xml文件的时候对应数据表newclass的字段id没有设置为主键,所以产生了这样的问题。引以为戒