Duplicate class/entity mapping

Could not parse configuration: /hibernate.cfg

Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping

Caused by: org.dom4j.DocumentException: FWK005 parse may not be called while pa
sing. Nested exception: FWK005 parse may not be called while parsing.

这些错误的解决方法:

总结:

HibernateSessionFactory 中 getSession() 方法加一个 synchronized 就可以实现

你可能感兴趣的:(Hibernate)