Attribute "class" must be declared for element type "mapping".是什么错误
严重:ErrorparsingXML:/hibernate.cfg.xml(24)Attribute"class"mustbedeclaredforelementtype...
严重: Error parsing XML: /hibernate.cfg.xml(24) Attribute "class" must be declared for element type "mapping".
Exception in thread "main" org.hibernate.MappingException: invalid configuration
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1209)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1150)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1136)
at HibernateTest.main(HibernateTest.java:23)
Caused by: org.xml.sax.SAXParseException: Attribute "class" must be declared for element type "mapping". 展开
Exception in thread "main" org.hibernate.MappingException: invalid configuration
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1209)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1150)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1136)
at HibernateTest.main(HibernateTest.java:23)
Caused by: org.xml.sax.SAXParseException: Attribute "class" must be declared for element type "mapping". 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询