Tuesday, November 17, 2009

DuplicateMappingException: Duplicate class/entity mapping

It turns out the deceptive exception can be thrown from an improperly formed Many-to-Many relationship declaration. I'm not going to take the time to document a correct declaration here but I was getting this misleading error message and was searching for an obvious problem with imports when it turned out to be the @ManyToMany annotation usage.

No comments: