javax.persistence.PersistenceException

[PersistenceUnit: TestAuditPU] Unable to build EntityManagerFactory

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web6

  • via Unknown by Rino Heinen,
  • via Unknown by Rino Heinen,
  • Stack trace

    • javax.persistence.PersistenceException: [PersistenceUnit: TestAuditPU] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) at testaudit.Main.main(Main.java:23) 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:1396) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891) ... 4 more Caused by: org.hibernate.MappingException: Type not supported: org.hibernate.type.ManyToOneType at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addIdProperties(IdMetadataGenerator.java:75) at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addId(IdMetadataGenerator.java:120) at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:374) at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:100) at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:86) at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99) at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:334) 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) ... 8 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.