9 Replies Latest reply on Jan 9, 2012 12:04 PM by Eduardo Yañez Parareda

    Hibernate 3.6 bundled + Seam 2.2.2

    Eduardo Yañez Parareda Newbie

      Hello, I'm trying to deploy an app, which was deployed before on JBoss 4.2,that uses hibernate 3.6.2.

       

      First of all, I've read the doc https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide about "Packaging the Hibernate 3.5 or greater 3.x JPA persistence provider with your application". Well, I'have excluded some modules from the server and added other ones:

       

      <?xml version="1.0" encoding="UTF-8"?>

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

          <deployment>

              <exclusions>

                  <module name="org.hibernate"/>

              </exclusions>

              <dependencies>

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

                  <module name="org.jboss.as.jpa.hibernate" slot="3"/>

              </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      Also I've tell JPA to use a provider bundled in my WAR at persistence.xml:

       

      <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />

       

      But I'm getting this error:

       

      11:08:33,299 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class org.jboss.as.jpa.hibernate3.JBossAppServerJtaPlatform in Module "org.jboss.as.jpa.hibernate:3" from local module loader @bc92535 (roots: /home/eyp/Aplicaciones/jboss-as-7.0.2.Final/modules): java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/JBossAppServerJtaPlatform (Module "org.jboss.as.jpa.hibernate:3" from local module loader @bc92535 (roots: /home/eyp/Aplicaciones/jboss-as-7.0.2.Final/modules))

              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.injectJtaManager(HibernatePersistenceProviderAdaptor.java:49)

              at org.jboss.as.jpa.processor.PersistenceProviderProcessor.deploy(PersistenceProviderProcessor.java:86)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/transaction/JNDITransactionManagerLookup

              at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_22]

              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_22]

              at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_22]

              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_22]

              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

              ... 16 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.transaction.JNDITransactionManagerLookup from [Module "org.jboss.as.jpa.hibernate:3" from local module loader @bc92535 (roots: /home/eyp/Aplicaciones/jboss-as-7.0.2.Final/modules)]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

              ... 21 more

       

       

      11:08:33,302 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."deudaval-web-test-2.2.11.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."deudaval-web-test-2.2.11.war".INSTALL: Failed to process phase INSTALL of deployment "deudaval-web-test-2.2.11.war"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

      Caused by: java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/JBossAppServerJtaPlatform (Module "org.jboss.as.jpa.hibernate:3" from local module loader @bc92535 (roots: /home/eyp/Aplicaciones/jboss-as-7.0.2.Final/modules))

              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.injectJtaManager(HibernatePersistenceProviderAdaptor.java:49)

              at org.jboss.as.jpa.processor.PersistenceProviderProcessor.deploy(PersistenceProviderProcessor.java:86)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

              ... 5 more

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/transaction/JNDITransactionManagerLookup

              at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_22]

              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_22]

              at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_22]

              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_22]

              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

              ... 16 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.transaction.JNDITransactionManagerLookup from [Module "org.jboss.as.jpa.hibernate:3" from local module loader @bc92535 (roots: /home/eyp/Aplicaciones/jboss-as-7.0.2.Final/modules)]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

              ... 21 more

       

      It says that can't find org.hibernate.transaction.JNDITransactionManagerLookup class, but it is in the hibernate-core-3.6.2.Final.jar within the WEB-INF/lib of my WAR.

       

      What am I doing wrong?

        • 1. Re: Hibernate 3.6 bundled
          Eduardo Yañez Parareda Newbie

          Well, I've removed the dependency <module name="org.jboss.as.jpa.hibernate" slot="3"/> from jboss-deployment-structure.xml so the persistence provider has been deployed fine:

           

          11:41:51,867 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence

          11:41:55,807 INFO  [org.jboss.jpa] (MSC service thread 1-8) starting Persistence Unit Service 'deudaval-web-test-2.2.11.war#deudavalPersistence'

          11:41:56,016 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-8) Hibernate Commons Annotations 3.2.0.Final

          11:41:56,020 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) Hibernate 3.6.2.Final

          11:41:56,022 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) hibernate.properties not found

          11:41:56,025 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) Bytecode provider name : javassist

          11:41:56,026 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) using JDK 1.4 java.sql.Timestamp handling

          11:41:56,063 INFO  [org.hibernate.ejb.Version] (MSC service thread 1-8) Hibernate EntityManager 3.6.2.Final

          11:41:56,072 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-8) Processing PersistenceUnitInfo [

                  name: deudavalPersistence

                  ...]

           

          But now I get this error:

           

          11:41:59,156 WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] (MSC service thread 1-5) no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.

          11:41:59,234 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/deudaval-web]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: deudavalWebDatabaseFactory

                  at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.init.Initialization.init(Initialization.java:744) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.jar:]

                  at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                  at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

          Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named deudavalPersistence

                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                  at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                  at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                  at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                  ... 13 more

           

          The persistence.xml is:

           

          <?xml version="1.0" encoding="UTF-8"?>

          <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

                    version="1.0">

                    <persistence-unit name="deudavalPersistence"                    transaction-type="RESOURCE_LOCAL">

                                   <provider>org.hibernate.ejb.HibernatePersistence</provider>

                                   <non-jta-data-source>java:/deudavalWebDatasource</non-jta-data-source>

           

                                   <jar-file>../lib/deudaval-core-model-${core.model.version}.jar</jar-file>

           

                                   <properties>

                                                  <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />

                                                  <property name="hibernate.show_sql" value="true" />

                                                  <!-- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> -->

                                                  <property name="hibernate.transaction.manager_lookup_class"                                        value="org.hibernate.transaction.JBossTransactionManagerLookup" />

                                                  <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy" />

                                    </properties>

                    </persistence-unit>

          </persistence>

           

          And the components.xml is:

           

              <core:manager conversation-timeout="1800000" concurrent-request-timeout="500" conversation-id-parameter="cid"/>

              <transaction:entity-transaction entity-manager="#{em}"/>

              <persistence:entity-manager-factory name="deudavalWebDatabaseFactory" persistence-unit-name="deudavalPersistence"/>

              <persistence:managed-persistence-context name="em" entity-manager-factory="#{deudavalWebDatabaseFactory}"/>

                <persistence:managed-persistence-context name="entityConverterEm" auto-create="true" entity-manager-factory="#{deudavalWebDatabaseFactory}"/>

                   <component name="viewRedirector" scope="session" class="es.rbcdexia.deudaval.seam.util.ViewRedirector" auto-create="true"/>

                <document:document-store use-extensions="true"></document:document-store>

                <ui:jpa-entity-loader entity-manager="#{entityConverterEm}"/>

                <security:identity authenticate-method="#{authenticator.authenticate}"/>

           

          What's wrong with those config files? Any help is appreciated.

          • 2. Re: Hibernate 3.6 bundled
            Scott Marlow Master

            What does your jboss-deployment-structure.xml contain currently? 

             

            Its not causing the problem your seeing but you should also comment out the "hibernate.transaction.manager_lookup_class"  property as its already specified for you.

             

            Could you try again with the nightly build, the link is here

            • 3. Re: Hibernate 3.6 bundled
              Eduardo Yañez Parareda Newbie

              Since I've been doing a lot of attempts to have it working, last attempts have been with this persistence.xml:

               

              <?xml version="1.0" encoding="UTF-8"?>

              <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

                        version="1.0">

                        <persistence-unit name="deudavalPersistence" transaction-type="RESOURCE_LOCAL">

                                  <provider>org.hibernate.ejb.HibernatePersistence</provider>

                                  <non-jta-data-source>java:jboss/datasources/deudavalWebDatasource</non-jta-data-source>

               

               

                                  <jar-file>../lib/deudaval-core-model-${core.model.version}.jar</jar-file>

               

               

                                  <properties>

                          <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />

                          <!-- <property name="jboss.as.jpa.providerModule" value="org.hibernate" />-->

                                            <property name="hibernate.show_sql" value="true" />

                                            <!-- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> -->

              <!--                               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />-->

              <!--             <property name="hibernate.transaction.manager_lookup_class" value="org.jboss.as.jpa.hibernate3.JBossAppServerJtaPlatform" />-->

                                            <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy" />

                                            <property name="hibernate.ejb.resource_scanner" value="es.rbcdexia.deudaval.util.PersistenceUtil$Scanner" />

                                            <property name="hibernate.dialect" value="es.rbcdexia.deudaval.util.PersistenceUtil$Dialect" />

                                  </properties>

                        </persistence-unit>

              </persistence>

               

              As you can see the property is commented out.... My jboss-deployment-structure.xml is:

               

              <?xml version="1.0" encoding="UTF-8"?>

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

                  <deployment>

                      <exclusions>

                          <module name="javax.faces.api" slot="main"/>

                          <module name="com.sun.jsf-impl" slot="main"/>

                          <module name="org.hibernate"/>

                          <!--<module name="javax.persistence.api"/>-->

                      </exclusions>

                      <dependencies>

                          <module name="org.apache.log4j" export="true"/>

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

                          <module name="org.apache.commons.logging" export="true"/>

                          <module name="org.apache.commons.collections" export="true"/>

                          <module name="javax.faces.api" slot="1.2" export="true"/>

                          <module name="com.sun.jsf-impl" slot="1.2" export="true"/>

                      </dependencies>

                  </deployment>

              </jboss-deployment-structure>

               

              Antway I'll try with the nightly build too.

              • 4. Re: Hibernate 3.6 bundled
                Eduardo Yañez Parareda Newbie

                I've tested with the nightly build... but get different errors.

                First one:

                 

                Caused by: javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

                        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                        ... 13 more

                Caused by: java.lang.ClassCastException: es.rbcdexia.deudaval.util.PersistenceUtil$Scanner cannot be cast to org.hibernate.ejb.packaging.Scanner

                        at org.hibernate.ejb.Ejb3Configuration.buildScanner(Ejb3Configuration.java:416) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) [hibernate-entitymanager-3.6.2.Final.jar:]

                        ... 27 more

                 

                 

                So I've commented out this line from persistence.xml:

                 

                <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy" />

                 

                Then, I've got another error:

                 

                 

                Caused by: javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

                        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                        ... 13 more

                Caused by: java.lang.ClassCastException: es.rbcdexia.deudaval.util.PersistenceUtil$Scanner cannot be cast to org.hibernate.ejb.packaging.Scanner

                        at org.hibernate.ejb.Ejb3Configuration.buildScanner(Ejb3Configuration.java:416) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) [hibernate-entitymanager-3.6.2.Final.jar:]

                        ... 27 more

                 

                 

                 

                 

                So I commented out another line from persistence.xml:

                 

                <property name="hibernate.ejb.resource_scanner" value="es.rbcdexia.deudaval.util.PersistenceUtil$Scanner" />

                 

                I didn't want to comment them out, but after that I get this new error:

                 

                Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: deudavalWebDatabaseFactory

                        at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.init.Initialization.init(Initialization.java:744) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.jar:]

                        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.7.Final.jar:]

                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.7.Final.jar:]

                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:77) [jboss-as-web-7.1.0.Final-SNAPSHOT.jar:7.1.0.Final-SNAPSHOT]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                        at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

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

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                        at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                        at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                        ... 13 more

                Caused by: org.hibernate.HibernateException: Unable to locate TypeSafeActivator#applyDDL method

                        at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.applyRelationalConstraints(BeanValidationIntegrator.java:226)

                        at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:126)

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

                        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-3.6.2.Final.jar:]

                        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76) [hibernate-entitymanager-3.6.2.Final.jar:]

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) [hibernate-entitymanager-3.6.2.Final.jar:]

                        ... 28 more

                Caused by: java.lang.NoSuchMethodException: org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(java.util.Collection, java.util.Properties, org.hibernate.dialect.Dialect)

                        at java.lang.Class.getMethod(Class.java:1605) [:1.6.0_22]

                        at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.applyRelationalConstraints(BeanValidationIntegrator.java:206)

                        ... 33 more

                 

                 

                Every seems to be a dependency problem, but I can't figure out which one . Those ClasscastExceptions with the Scanner and the Dialect don't happen with JB 7.0.2, also are very strange because the app is working fine with Hibernate 3.6.2 on JBoss 4.2.2

                 

                My current jboss-deployment-structure.xml is:

                 

                <?xml version="1.0" encoding="UTF-8"?>

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

                    <deployment>

                        <exclusions>

                            <module name="javax.faces.api" slot="main"/>

                            <module name="com.sun.jsf-impl" slot="main"/>

                            <module name="org.hibernate"/>

                            <module name="org.antlr"/>

                            <module name="org.javassist"/>

                            <module name="asm.asm"/>

                            <module name="org.hibernate.validator"/>

                            <module name="javax.persistence.api"/>

                        </exclusions>

                        <dependencies>

                            <module name="org.apache.log4j" export="true"/>

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

                <!--            <module name="org.apache.commons.logging" export="true"/>

                            <module name="org.apache.commons.collections" export="true"/>-->

                            <module name="javax.faces.api" slot="1.2" export="true"/>

                            <module name="com.sun.jsf-impl" slot="1.2" export="true"/>

                        </dependencies>

                    </deployment>

                </jboss-deployment-structure>

                 

                • 5. Re: Hibernate 3.6 bundled
                  Scott Marlow Master

                  Can you list the jars included in your WEB-INF/lib? 

                  • 6. Re: Hibernate 3.6 bundled
                    Eduardo Yañez Parareda Newbie

                    Yes, of course....

                     

                    activation-1.1.jar

                    antlr-2.7.6.jar

                    antlr-runtime-3.0.1.jar

                    asm-3.1.jar

                    cglib-2.2.jar

                    com.ibm.mq-5.3.07.jar

                    commons-beanutils-1.8.0.jar

                    commons-codec-1.4.jar

                    commons-collections-3.1.jar

                    commons-digester-2.0.jar

                    commons-lang-2.1.jar

                    commons-logging-1.0.4.jar

                    deudaval-core-financiera-2.0.0.jar

                    deudaval-core-model-1.3.0.jar

                    deudaval-core-opeprocs-2.0.0.jar

                    deudaval-core-service-2.0.0.jar

                    deudaval-core-service-impl-2.0.0.jar

                    deudaval-core-util-1.6.0.jar

                    deudaval-core-vre-1.4.0.jar

                    deudaval-informes-1.5.0.jar

                    dom4j-1.6.1.jar

                    hibernate-commons-annotations-3.2.0.Final.jar

                    hibernate-core-3.6.2.Final.jar

                    hibernate-entitymanager-3.6.2.Final.jar

                    hibernate-jpa-2.0-api-1.0.0.Final.jar

                    hibernate-validator-3.1.0.GA.jar

                    infoval-client-prod-3.0.269.jar

                    javamail-crypto-060622.jar

                    javassist-3.12.0.GA.jar

                    jboss-el-1.0_02.CR5.jar

                    jboss-seam-2.2.2.Final.jar

                    jboss-seam-debug-2.2.2.Final.jar

                    jboss-seam-jul-2.2.2.Final.jar

                    jboss-seam-ui-2.2.2.Final.jar

                    jconn3-6.05-EBF16903.jar

                    jettison-1.2.jar

                    jsf-facelets-1.1.15.jar

                    json-20080701.jar

                    jta-1.1.jar

                    jug-2.0.0-asl.jar

                    log4j-1.2.14.jar

                    mail-1.4.1.jar

                    oro-2.0.8.jar

                    person-client-prod-2.0.23.jar

                    poi-3.7.jar

                    rating-client-prod-3.0.28.jar

                    richfaces-api-3.3.1.GA.jar

                    richfaces-impl-3.3.1.GA.jar

                    richfaces-ui-3.3.1.GA.jar

                    security-client-3.0.3.jar

                    serfj-0.3.0.jar

                    slf4j-api-1.5.11.jar

                    slf4j-log4j12-1.5.11.jar

                    spring-2.5.6.jar

                    stax-1.2.0.jar

                    stax-api-1.0.1.jar

                    stringtemplate-3.1-b1.jar

                    velocity-1.5.jar

                    xpp3-1.1.4c.jar

                    xpp3_min-1.1.3.4.O.jar

                    xstream-1.0.2.jar

                    • 7. Re: Hibernate 3.6 bundled
                      Scott Marlow Master

                      Try removing hibernate-validator-3.1.0.GA.jar (might also need to remove hibernate-jpa-2.0-api-1.0.0.Final.jar).

                      • 8. Re: Hibernate 3.6 bundled
                        Scott Marlow Master

                        Although, the solution we end up with, may be different since Seam is not using the AS7 jpa subsystem in the original call stack you pasted.  I would still like to understand what the failure is after you make the lib changes.

                        • 9. Re: Hibernate 3.6 bundled
                          Eduardo Yañez Parareda Newbie

                          Hi, I'm here again after my holidays....

                          Scott Marlow wrote:

                           

                          Try removing hibernate-validator-3.1.0.GA.jar (might also need to remove hibernate-jpa-2.0-api-1.0.0.Final.jar).

                           

                          Well, I've removed the hibernate-validator-3.1.0.GA.jar from the dependencies but I still get this error in the 7.0.2 Final version:

                           


                          17:48:20,900 WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] (MSC service thread 1-2) no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.

                          17:48:20,962 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/deudaval-web]] (MSC service thread 1-2) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: deudavalWebDatabaseFactory

                                  at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.init.Initialization.init(Initialization.java:744) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.jar:]

                                  at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                                  at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

                          Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named deudavalPersistence

                                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                                  at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                                  at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                                  ... 13 more

                           

                           

                           

                          Also I've tried it on nightly build but got this other error:

                           

                           

                          18:02:20,566 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/deudaval-web]] (MSC service thread 1-8) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: deudavalWebDatabaseFactory

                                  at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.init.Initialization.init(Initialization.java:744) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.jar:]

                                  at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.7.Final.jar:]

                                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.7.Final.jar:]

                                  at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:77) [jboss-as-web-7.1.0.Final-SNAPSHOT.jar:7.1.0.Final-SNAPSHOT]

                                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]

                                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]

                          Caused by: javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

                                  at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385) [hibernate-entitymanager-3.6.2.Final.jar:]

                                  at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) [hibernate-entitymanager-3.6.2.Final.jar:]

                                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                                  at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam-2.2.2.Final.jar:]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]

                                  at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.callComponentMethod(Component.java:2283) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]

                                  at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]

                                  ... 13 more

                          Caused by: java.lang.ClassCastException: es.rbcdexia.deudaval.util.PersistenceUtil$Scanner cannot be cast to org.hibernate.ejb.packaging.Scanner

                                  at org.hibernate.ejb.Ejb3Configuration.buildScanner(Ejb3Configuration.java:416) [hibernate-entitymanager-3.6.2.Final.jar:]

                                  at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350) [hibernate-entitymanager-3.6.2.Final.jar:]

                                  ... 27 more

                           

                           

                           

                          I haven't been able to remove the hibernate-jpa-2.0-api-1.0.0.Final.jar because the project has dependencies with javax.persistence.EntityManager