How you fix the following Hibernate error:
What does "Use of the same entity name twice".
How you fix the following Hibernate error:
What does "Use of the same entity name twice".
I think it means you have declared the same entity in more than one configuration file.
Without more information, I would try commenting out chunks of your config file so that you don't see the error, and then slowly adding sections back in until you encounter the error?
If its only a few config files, then why not post them here? When posting, if you add 4 spaces to the front of your XML, then it will be:
<xml>nicely formatted</xml>
Hope this helps.
One of the most common mistakes you could make to produce this error is to attempt to persist two different Java classes in identically-named tables. Hibernate likes there being exactly one kind of thing in each table (with some exceptions for subclasses and the like), and so if you were to create a class called maybe StudentRecord and a class called MusicRecords, and if you then told Hibernate to persist both of those classes into a table called "records", you could produce that kind of exception. With that particular wording, I suspect you're using annotations (in which case it's even easier to accidentally name two tables, described in two different Java classes, the same thing).
Hope this helps! (although perhaps not, as I have noticed just now that you asked this question 7 months ago. I do hope you're not still stuck, sir!)
I've come across this error a few different times. The causes were as follows: