i am working on a small application and I am trying to use Hibernate Annotations to map my entities. I wanted to test if everything is alright when i got this exception : >
Right, erickson has identified the issue correctly.
This is likely caused by having two conflicting versions of the same type definition in your classpath. For example, library-version2.jar defines some stuff, but you've also got library-version5.jar in your classpath.
At runtime, this results in the pain and suffering erickson describes.