0 Replies Latest reply on May 26, 2014 5:36 AM by markjasonn

    Hibernate 4 on Seam 2.3

    markjasonn

      I am seeing outdated discussions about this issue. I hope someone can help me.

       

      I am trying to migrate our project from Seam 2.2 to 2.3 (which also includes migrating hibernate 3.x to 4.x) and I am having an issue. Please see error logs below:

       

      17:24:55,114 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 52) MSC00001: Failed to start service jboss.persistenceunit."edd_master.war#dbase1": org.jboss.msc.service.StartException in service jboss.persistenceunit."edd_master.war#dbase1": javax.persistence.PersistenceException: [PersistenceUnit: dbase1] Unable to build EntityManagerFactory

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:100) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_27]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_27]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: dbase1] Unable to build EntityManagerFactory

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

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

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:197) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$500(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:96) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          ... 4 more

      Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)

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

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

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

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

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

          ... 9 more

       

      17:24:55,212 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 51) MSC00001: Failed to start service jboss.persistenceunit."edd_master.war#edd_master": org.jboss.msc.service.StartException in service jboss.persistenceunit."edd_master.war#edd_master": javax.persistence.PersistenceException: [PersistenceUnit: edd_master] Unable to build EntityManagerFactory

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:100) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_27]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_27]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: edd_master] Unable to build EntityManagerFactory

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

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

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:197) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$500(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:96) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          ... 4 more

      Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)

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

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

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

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

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

          ... 9 more

       

      17:24:55,368 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 50) MSC00001: Failed to start service jboss.persistenceunit."edd_master.war#dbase2": org.jboss.msc.service.StartException in service jboss.persistenceunit."edd_master.war#dbase2": javax.persistence.PersistenceException: [PersistenceUnit: dbase2] Unable to build EntityManagerFactory

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:100) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_27]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_27]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: dbase2] Unable to build EntityManagerFactory

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

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

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:197) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$500(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:96) [jboss-as-jpa-7.1.3.Final.jar:7.1.3.Final]

          ... 4 more

      Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)

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

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

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

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

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

          ... 9 more

      This is my jboss-deployment-structure.xml

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

          <deployment>

              <dependencies>

                  <module name="com.mysql" export="true" />

                  <module name="org.dom4j" export="true" />

              </dependencies>

              <exclusions>

                  <module name="org.jboss.resteasy.resteasy-jettison-provider" />

                  <module name="org.jboss.resteasy.resteasy-jaxrs" />

                  <module name="org.jboss.resteasy.resteasy-atom-provider" />

                  <module name="org.jboss.resteasy.resteasy-jaxb-provider" />

              </exclusions>

          </deployment>

      </jboss-deployment-structure>

      I am using JBoss 7.1.3