犯过:异常5
SSH阶段常见的异常系列之一hibernate(15条)
异常一
异常一
异常描述: Sax解析异常:cvc-复杂的类型,发现了以元素maping开头的无效内容,应该是以
‘{“http://www.hibernate.org/xsd/orm/cfg“:property, “http://www.hibernate.org/xsd/orm/cfg“:mapping, “http://www.hibernate.org/xsd/orm/cfg“:class-cache, “http://www.hibernate.org/xsd/orm/cfg“:collection-cache, “http://www.hibernate.org/xsd/orm/cfg“:event, “http://www.hibernate.org/xsd/orm/cfg“:listener}’
几种之一开头。
在使用hibernate框架存取数据的过程中,使用单元测试,后台报错
异常信息: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: 发现了以元素 ‘maping’ 开头的无效内容。应以 ‘{“http://www.hibernate.org/xsd/orm/cfg“:property, “http://www.hibernate.org/xsd/orm/cfg“:mapping, “http://www.hibernate.org/xsd/orm/cfg“:class-cache, “http://www.hibernate.org/xsd/orm/cfg“:collection-cache, “http://www.hibernate.org/xsd/orm/cfg“:event, “http://www.hibernate.org/xsd/orm/cfg“:listener}’ 之一开头。]
异常原因: 在hibernate主配置文件中,写入了无效的标签。错误的标签如下:
true
update