0 Replies Latest reply on Jul 23, 2014 6:39 PM by Gerardo Arroyo

    JBoss EAP 6.2 and Hibernate 3

    Gerardo Arroyo Newbie

      Hi!

       

      I'm migrating an application from GlassFish 2 to EAP 6.2. So far I created a new slot for hibernate 3; change the persistence.xml and the jboss-deployment-structure. However, I am getting this error and I don't have a clue about what is the issue:

       

      16:26:09,221 WARN  [org.jboss.modules] (MSC service thread 1-11) Failed to define class org.hibernate.transaction.JNDITransactionManagerLookup in Module "org.hibernate:3" from local module loader @de0a01f (finder: local module finder @4c75cab9 (roots: E:\RedHat\jboss-eap-6.2\modules,E:\RedHat\jboss-eap-6.2\modules\system\layers\base)): org.jboss.modules.ModuleLoadError: org.apache.ant:main

        at org.jboss.modules.ModuleLoadException.toError(ModuleLoadException.java:78) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.Module.getPathsUnchecked(Module.java:1372) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.Module.loadModuleClass(Module.java:543) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_05]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_05]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_05]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_05]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

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

        at org.jboss.as.jpa.processor.PersistenceProviderAdaptorLoader.loadPersistenceAdapterModule(PersistenceProviderAdaptorLoader.java:117)

        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.getPersistenceProviderAdaptor(PersistenceUnitServiceHandler.java:531)

        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deployPersistenceUnit(PersistenceUnitServiceHandler.java:295)

        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:275)

        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDeployment(PersistenceUnitServiceHandler.java:190)

        at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:116)

        at org.jboss.as.jpa.processor.PersistenceCompleteInstallProcessor.deploy(PersistenceCompleteInstallProcessor.java:48)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]

       

      My persistence.xml is:

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

      <persistence version="1.0" 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">

        <persistence-unit name="HubPagosPU" transaction-type="JTA">

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

          <jta-data-source>java:jboss/datasources/jdbc/paywiseOracle</jta-data-source>

          <exclude-unlisted-classes>false</exclude-unlisted-classes>

          <properties>

            <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

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

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

               <property name="jboss.as.jpa.providerModule" value="org.hibernate:3"/>

               <property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:3"/>  

          </properties>

        </persistence-unit>

      </persistence>

       

      The module is:

      <module xmlns="urn:jboss:module:1.1" name="org.hibernate" slot="3">

          <resources>

            <resource-root path="hibernate3.jar"/> 

        <resource-root path="javassist.jar"/>

              <resource-root path="antlr-2.7.6.jar"/> 

              <resource-root path="commons-collections.jar"/> 

        <resource-root path="dom4j-1.6.1.jar"/> 

          </resources>

       

          <dependencies>

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

              <module name="asm.asm"/>

              <module name="javax.api"/>

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

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

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

              <module name="org.apache.ant"/>

              <module name="org.infinispan"/>

              <module name="org.javassist"/>

              <module name="org.slf4j"/>

          </dependencies>

      </module>

       

      and the jboss-deployment-structure is:

      <jboss-deployment-structure>

          <deployment>   

              <exclusions>

                  <module name="org.hibernate" slot="main"/>

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

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

                  <module name="org.apache.log4j" slot="main"/>          

                  <module name="org.apache.commons.logging" slot="main"/>           

              </exclusions>

              <dependencies>

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

              </dependencies>

          </deployment>

      </jboss-deployment-structure>