2 Replies Latest reply on Sep 4, 2012 3:54 AM by qqq qqqq

    Type not supported for auditing: org.hibernate.type.IdentifierBagType

    qqq qqqq Newbie

      Hello,

       

      we are using hibernate 4.0.1 with JBoss 7.1.1 and getting following error:

       

      org.hibernate.MappingException: Type not supported for auditing: org.hibernate.type.IdentifierBagType, on entity com.compugroup.vitax.inventory.entity.catalog.impl.OwnerType, property 'serviceOfferList'.

          at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.throwUnsupportedTypeException(AuditMetadataGenerator.java:526)

          at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addMapper(CollectionMetadataGenerator.java:511)

          at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addWithMiddleTable(CollectionMetadataGenerator.java:385)

          at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addCollection(CollectionMetadataGenerator.java:161)

          at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:205)

          at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:224)

          at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:485)

          at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:114)

          at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:103)

          at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:135)

          at org.hibernate.envers.event.EnversIntegrator.integrate(EnversIntegrator.java:63)

          at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)

          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

       

      Our Entity-Snapshot looks like:

       

      @Override

          @ManyToMany(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, targetEntity = ServiceOfferType.class)

          @GenericGenerator(name = "uuid-gen", strategy = "uuid")

          @CollectionId(columns = @Column(name = "COL_ID", nullable = false), type = @Type(type = "string"), generator = "uuid-gen")

          @JoinTable(name = "OwnerType_ServiceOffer", joinColumns = @JoinColumn(nullable = false, name = "ownerType_Id", referencedColumnName = "uid", unique = false))

          @Valid

          @Audited()

          public List<IServiceOffer> getServiceOfferList() {

              return serviceOfferList;

          }