4 Replies Latest reply on Jun 12, 2013 5:26 AM by emlun

    org.jboss.as.jpa.hibernate module can't find its own classes

    emlun Newbie

      I have this problem: http://stackoverflow.com/questions/17047430/why-cant-this-jboss-7-module-find-its-own-classes

       

      Summary:

       

      I'm trying to use a hibernate 3 module created by following the instructions at https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide#JPAReferenceGuide-SharingtheHibernate3.5orgreaterJPApersistenceproviderbetweenmultipleapplications. This module depends on the org.jboss.as.jpa.hibernate module, which throws "ClassNotFoundException: org.jboss.as.jpa.hibernate3.infinispan.SharedInfinispanRegionFactory from [Module "org.jboss.as.jpa.hibernate:3" from local module loader]" when I attempt to deploy an application that uses hibernate 3. But that class is in the jar specified as a <resource-root> in the org.jboss.as.jpa.hibernate module's nmodule.xml! That just doesn't make any sense at all to me, what's wrong?

        • 1. Re: org.jboss.as.jpa.hibernate module can't find its own classes
          jaikiran pai Master

          Please post the entire exception stacktrace. Which exact version of the server is this?

          • 2. Re: org.jboss.as.jpa.hibernate module can't find its own classes
            emlun Newbie

            Sorry, should have expected that would be needed.

             

            "workflow" is the name of the persistence unit.

            09:12:27,939 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "zz10-wf.spring"
            09:12:28,131 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for workflow
            09:12:28,193 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class org.jboss.as.jpa.hibernate3.infinispan.InfinispanRegionFactory in Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules): java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/infinispan/InfinispanRegionFactory (Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules))
                at org
            .jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                at java
            .lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_02]
                at java
            .security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_02]
                at org
            .jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.<clinit>(HibernatePersistenceProviderAdaptor.java:49)
                at java
            .lang.Class.forName0(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.Class.forName(Class.java:264) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$LazyIterator.next(ServiceLoader.java:362) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$1.next(ServiceLoader.java:438) [rt.jar:1.7.0_02]
                at org
            .jboss.as.jpa.processor.PersistenceProviderAdaptorLoader.loadPersistenceAdapterModule(PersistenceProviderAdaptorLoader.java:104)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.getPersistenceProviderAdaptor(PersistenceUnitDeploymentProcessor.java:467)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:277)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:145)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:120)
                at org
            .jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at java
            .util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]
                at java
            .util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]
                at java
            .lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
            Caused by: java.lang.NoClassDefFoundError: org/hibernate/cache/infinispan/InfinispanRegionFactory
                at java
            .lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_02]
                at java
            .security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_02]
                at org
            .jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
               
            ... 38 more
            Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.infinispan.InfinispanRegionFactory from [Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules)]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
               
            ... 43 more

            09:12:28,343 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class org.jboss.as.jpa.hibernate3.infinispan.SharedInfinispanRegionFactory in Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules): java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/infinispan/SharedInfinispanRegionFactory (Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules))
                at org
            .jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.<clinit>(HibernatePersistenceProviderAdaptor.java:49)
                at java
            .lang.Class.forName0(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.Class.forName(Class.java:264) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$LazyIterator.next(ServiceLoader.java:362) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$1.next(ServiceLoader.java:438) [rt.jar:1.7.0_02]
                at org
            .jboss.as.jpa.processor.PersistenceProviderAdaptorLoader.loadPersistenceAdapterModule(PersistenceProviderAdaptorLoader.java:104)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.getPersistenceProviderAdaptor(PersistenceUnitDeploymentProcessor.java:467)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:277)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:145)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:120)
                at org
            .jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at java
            .util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]
                at java
            .util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]
                at java
            .lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
            Caused by: java.lang.NoClassDefFoundError: org/jboss/as/jpa/hibernate3/infinispan/InfinispanRegionFactory
                at java
            .lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_02]
                at java
            .security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_02]
                at org
            .jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
               
            ... 25 more
            Caused by: java.lang.ClassNotFoundException: org.jboss.as.jpa.hibernate3.infinispan.InfinispanRegionFactory from [Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules)]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
               
            ... 30 more

            09:12:28,459 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."zz10-wf.spring".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."zz10-wf.spring".INSTALL: Failed to process phase INSTALL of deployment "zz10-wf.spring"
                at org
            .jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org
            .jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at java
            .util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]
                at java
            .util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]
                at java
            .lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
            Caused by: java.util.ServiceConfigurationError: org.jboss.as.jpa.spi.PersistenceProviderAdaptor: Provider org.jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor could not be instantiated: java.lang.NoClassDefFoundError: org/jboss/as/jpa/hibernate3/infinispan/SharedInfinispanRegionFactory
                at java
            .util.ServiceLoader.fail(ServiceLoader.java:224) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader.access$100(ServiceLoader.java:181) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$LazyIterator.next(ServiceLoader.java:370) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$1.next(ServiceLoader.java:438) [rt.jar:1.7.0_02]
                at org
            .jboss.as.jpa.processor.PersistenceProviderAdaptorLoader.loadPersistenceAdapterModule(PersistenceProviderAdaptorLoader.java:104)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.getPersistenceProviderAdaptor(PersistenceUnitDeploymentProcessor.java:467)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:277)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:145)
                at org
            .jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:120)
                at org
            .jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
               
            ... 5 more
            Caused by: java.lang.NoClassDefFoundError: org/jboss/as/jpa/hibernate3/infinispan/SharedInfinispanRegionFactory
                at org
            .jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.<clinit>(HibernatePersistenceProviderAdaptor.java:49)
                at java
            .lang.Class.forName0(Native Method) [rt.jar:1.7.0_02]
                at java
            .lang.Class.forName(Class.java:264) [rt.jar:1.7.0_02]
                at java
            .util.ServiceLoader$LazyIterator.next(ServiceLoader.java:362) [rt.jar:1.7.0_02]
               
            ... 13 more
            Caused by: java.lang.ClassNotFoundException: org.jboss.as.jpa.hibernate3.infinispan.SharedInfinispanRegionFactory from [Module "org.jboss.as.jpa.hibernate:3" from local module loader @53c8b26e (roots: C:\Users\Emil\JBoss\jboss-as-7.1.1.Final\modules)]
                at org
            .jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org
            .jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org
            .jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
               
            ... 17 more

            09:12:28,538 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "zz10-wf.spring" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"zz10-wf.spring\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"zz10-wf.spring\".INSTALL: Failed to process phase INSTALL of deployment \"zz10-wf.spring\""}}
            09:12:28,572 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment zz10-wf.spring in 33ms

             

            This is JBoss AS 7.1.1.Final.

            • 3. Re: org.jboss.as.jpa.hibernate module can't find its own classes
              emlun Newbie

              Also, here's my 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="workflow">

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

                  <properties>

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

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

                      <property name="hibernate.cache.use_second_level_cache" value="false"/>

                  </properties>

                </persistence-unit>

              </persistence>

              The problem occurs both with and without the <property name="hibernate.cache.use_second_level_cache" value="false"/> element.

               

              org.hibernate:3 module.xml:

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

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

                  <resources>

                      <resource-root path="hibernate-core.jar"/>

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

                      <resource-root path="hibernate-entitymanager.jar"/>

                  </resources>

                  <dependencies>

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

                      <module name="javax.api"/>

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

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

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

                      <module name="org.antlr"/>

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

                      <module name="org.dom4j"/>

                      <module name="org.infinispan"/>

                      <module name="org.javassist"/>

                      <module name="org.jboss.logging"/>

                      <module name="org.slf4j"/>

                  </dependencies>

              </module>

              The org.jboss.as.jpa.hibernate:3 module.xml can be seen over at stack overflow: http://stackoverflow.com/questions/17047430/why-cant-this-jboss-7-module-find-its-own-classes

              • 4. Re: org.jboss.as.jpa.hibernate module can't find its own classes
                emlun Newbie

                And in case it's relevant, the deployment that causes the exception is a Spring application that I deploy using the Snowdrop module. The problem does not occur if I simply don't specify what Hibernate version to use, and just fall back on the default Hibernate 4, but I suspect that my application doesn't work with Hibernate 4 since it uses Spring 3.2, as explained here: https://docs.jboss.org/author/display/AS7/Spring+applications+development+and+migration+guide#Springapplicationsdevelopmentandmigrationguide-NativeSpring/Hibernateapplications. The reason I want to use Hibernate 3 is because I suspect that Spring not being compatible with Hibernate 4 is the cause of this: http://stackoverflow.com/questions/17019485/on-jboss-as-7-1-1-why-does-hibernates-annotationbinder-not-detect-annotated-en where it seems like Spring first runs Hibernate's AnnotationBinder and does not detect anything, and then some other component of JBoss runs the AnnotationBinder again and detects entities this second time. I want to try using Hibernate 3 to see if this solves the problem with the AnnotationBinder.