1 Reply Latest reply on Apr 2, 2009 11:27 AM by Adam Warski

    Unable to build EntityManagerFactory

    Brocha Strous Newbie

      Hello,
      I am getting an exception when trying to build the EntityManagerFactory. I am able to generate the schema for my DB using an ant task.

      Here is the exception:

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: pdm] Unable to build EntityManagerFactory
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
      at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
      at com.xconnect.peering.test.TestRegistry.(TestRegistry.java:58)
      ... 16 more
      Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.envers.entity.EnversUnionSubclassEntityPersister
      at org.hibernate.persister.PersisterFactory.create(PersisterFactory.java:94)
      at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:64)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
      ... 20 more
      Caused by: java.lang.NoSuchMethodException: org.hibernate.envers.entity.EnversUnionSubclassEntityPersister.(org.hibernate.mapping.PersistentClass, org.hibernate.cache.CacheConcurrencyStrategy, org.hibernate.engine.SessionFactoryImplementor, org.hibernate.engine.Mapping)
      at java.lang.Class.getConstructor0(Class.java:2706)
      at java.lang.Class.getConstructor(Class.java:1657)
      at org.hibernate.persister.PersisterFactory.create(PersisterFactory.java:91)
      ... 25 more


      Thanks,
      Brocha