4 Replies Latest reply on Oct 21, 2011 9:27 AM by Adam Warski

    Type not supported: org.hibernate.type.ManyToOneType

    henry donnell Newbie

      What could be the reason for the following error??

      If I annotate other entities with @Audited, everything is OK, but one certain entity which has code like this


      @ManyToOne(fetch=FetchType.EAGER)
      @JoinColumn(name="SICPCCY", nullable = false)
      public CurrencyDTO getSicpccy()
      {
      return this.sicpccy;
      }



      and is causing envers or hibernate to throw an exception.....

      Did I overlook something in the envers docs???




      Caused by: org.hibernate.HibernateException: could not init listeners
      at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
      at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1352)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:854)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
      ... 95 more
      Caused by: org.hibernate.MappingException: Type not supported: org.hibernate.type.ManyToOneType
      at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addIdProperties(IdMetadataGenerator.java:70)
      at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addId(IdMetadataGenerator.java:101)
      at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:331)
      at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:87)
      at org.hibernate.envers.configuration.AuditConfiguration.(AuditConfiguration.java:86)
      at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
      at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:260)
      at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
      at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
      at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
      ... 99 more