I'm new to hibernate, and I'm suddenly having a similar issue...
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping ebookdata.EbkBook.ebkRecords
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
My web app was working fine and suddenly it started throwing this exception. I noticed a couple of interesing things.
ONE:
This issue came up suddenly after I created some mappings and classes by reverse engineering and created a handful of classes. This new stuff is not mentioned in the exception. Interestingly, the referenced mapping is the FIRST mapping in my config file, thefirst one I created.
When I changed the order of the config file, it then references the new FIRST mapping. This makes me think that the mappings are somehow being read twice. I don't see how.
TWO:
When I restored my classes and mappings from before I had the issue, it did not go away. This restore did not include the workspace .metadata folder which I discovered was not being versioned.
Any thoughts?? This is driving me crazy. I'm trying to debug it but I'm just learning how at this point.
_________________ Kurt Umholtz
The Parker River Group, Inc.
|