The default hibernate DTD is used for recently written projects. This problem often occurs when starting projects. Hibernate reports an error, the ID of the configuration factory cannot be found, and the mapping configuration file cannot be found
Unable to read configuration XML file
Could not parse mapping document from input stream
……………
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
…………..
Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
…………..
After checking a lot of information, we finally found an effective solution:
In the xxx.hbm.xml configuration file corresponding to the POJO class, the“ http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd “> Replace with:
” http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd “, restart the project to solve the problem
Similar Posts:
- How hibernate 3 used in jbpm4.4 is compatible with spring 5.X and the exception caused by: java.lang.classnotfoundexception: org.hibernate.impl.sessionimpl
- [Solved] Java:Hibernate Error executing DDL via JDBC Statement
- Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User
- [Solved] org.hibernate.MappingException: Unknown entity
- Hibernate:No default constructor for entity [How to Solve]
- [Solved] Hibernate Error: org.hibernate.InstantiationException: No default constructor for entity
- [Solved] org.hibernate.AnnotationException: No identifier specified for entity: com.example1.demo1.Entity….
- Failed to decode downloaded font [How to Solve]
- Springmvc Error: HTTP Status 500 – Could not write content: No serializer