There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm using an order column for an @OrderColumn which is also part of a foreign key like: {code}@ManyToMany @JoinTable(name = "GroupLinks", joinColumns = {@JoinColumn(name = "parent_round_id", referencedColumnName = "round_id"), @JoinColumn(name = "parent_ordinal_nbr", referencedColumnName = "ordinal_nbr")}, inverseJoinColumns = {@JoinColumn(name = "child_round_id", referencedColumnName = "round_id"), @JoinColumn(name = "child_ordinal_nbr", referencedColumnName = "ordinal_nbr")}) @OrderColumn(name = "child_ordinal_nbr") private List<Group> children;{code} As you can see the order column "child_ordinal_nbr" is also an FK (and PK) in the join table. However, this fails with a mapping exception: {code}Caused by: org.hibernate.MappingException: Repeated column in mapping for collection: com.kawoolutions.bbstats.model.Group.parents column: parent_ordinal_nbr at org.hibernate.mapping.Collection.checkColumnDuplication( at org.hibernate.mapping.Collection.checkColumnDuplication( at org.hibernate.mapping.Collection.validate( at org.hibernate.mapping.IndexedCollection.validate( at org.hibernate.cfg.Configuration.validate( at org.hibernate.cfg.Configuration.buildSessionFactory( at org.hibernate.ejb.EntityManagerFactoryImpl.<init>( at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory( ... 9 more{code} IMO there's no reason to assume the order column is not a foreign key column, too. I've posted an extensive example over at While the JPA spec is silent about this behavior there's no reason why the depicted scenario shouldn't be working.
    via by Karsten Wutzke,
  • Hibernate mapping. Table related with other two
    via Stack Overflow by Rob
  • To reproduce this issue you need to: a) Load some hbm files using the AnnotationConfiguration b) Use a subclass reference referring to a class in a separate file via the "extends" attribute in your hbm files What happens is that you will get an exception from the buildSessionFactory call on AnnotationConfiguration similar to the following: org.hibernate.MappingException: Following superclasses referenced in extends not found: org.gs1.v202.gdsn.RegistryPartyDataDumpType at org.hibernate.cfg.Configuration.processExtendsQueue( at org.hibernate.cfg.Configuration.secondPassCompile( at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile( at org.hibernate.cfg.Configuration.buildSessionFactory( A simple workaround is to use the base Configuration class rather than the AnnotationConfiguration. However, this is not practical if you need to load a mix of existing hbm files as well as new classes that use annotations. The reason that this occurs is that the AnnotationConfiguration class overrides the add method of Configuration, storing all of the hbm files in a Map for later processing. This works fine for regular class files; however, it is not compatible with the recursive hbm file processing performed by processExtendsQueue. I've attached a fix for this issue that disables the delayed hbm processing before processing of the extends queue begins. This modification fixes this issue in the unit tests of the application I am working on. Please see the attached java file that includes the integrated fix built off the latest CVS version, as well as the unified diff I created via CVS. I would appreciate it if this fix could be rolled into the upcoming 3.1beta7, and would be happy to help out with whatever documentation or unit tests are needed for final integration. Cheers, --Steve
    via by Stephen Chin,
    • org.hibernate.MappingException: Repeated column in mapping for entity: org.gestion.infopanne.entities.simplemessage column: genre (should be mapped with insert="false" update="false") at org.hibernate.mapping.PersistentClass.checkColumnDuplication( at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication( at org.hibernate.mapping.PersistentClass.checkColumnDuplication( at org.hibernate.mapping.PersistentClass.validate( at org.hibernate.mapping.SingleTableSubclass.validate( at org.hibernate.cfg.Configuration.validate( at org.hibernate.cfg.Configuration.buildSessionFactory( at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(

    Users with the same issue

    4 times, last one,
    16 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    41 more bugmates