Org.hibernate.DuplicateMappingException:duplicate Import:
For example, the exception information is as follows:
Duplicate import:user refers to both Org.jbpm.identity.User and Com.xiaobai.oa.model.User (try using auto-import= "false" )
Presumably, the repeated introduction of the User class refers to Org.jbpm.identity.User and Com.xiaobai.oa.model.User respectively.
My project is based on the workflow development of JBPM (a workflow engine). This exception is thrown by hibernate at the time of mapping, and there are two ways to resolve this exception:
The first: the direct way, that is, your own class name to change a name.
The second type: the class that will take place the exception (the class of its own program) in the context of the above exception should be the Com.xiaobai.oa.model.User hibernate mapping file The principle of the second workaround is:
When using Hibernate's HQL query statement, such as "Select User from User User"
The class name from the back is automatically introduced by default, which is the effect of