配置的xml文件中,主键不能为空 否则会出现以下报错
2017-08-25 09:19:41,843 [org.hibernate.util.DTDEntityResolver]-[WARN] recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
2017-08-25 09:19:41,859 [org.hibernate.util.xml.ErrorLogger]-[ERROR] Error parsing XML (2) : The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,fetch-profile*,resultset*,(query|sql-query)*)".
2017-08-25 09:19:41,859 [org.springframework.web.context.support.XmlWebApplicationContext]-[WARN] Exception encountered during context initialization - cancelling refresh attempt
本文描述了当配置的XML文件中主键为空时,Hibernate在解析XML过程中出现的具体错误信息及警告,包括使用过时的命名空间和元素内容不匹配等问题。
990

被折叠的 条评论
为什么被折叠?



