1 2 Previous Next 21 Replies Latest reply: Jun 25, 2012 9:23 AM by Thomas Woelfle RSS

    AS 7 Custom Hibernate Persistence Provider in EAR

    Thomas Woelfle Newbie

      We have have a custom implementation of HibernatePersistence. We've packaged it in the 'ear' file since it uses other classes from our application. When deploying the application a 'NoClassDefFoundError' for 'org.hibernate.ejb.HibernatePersistence' occurs.

       

      08:50:14,766 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class my.custom.HibernatePersistence in Module "deployment.ear.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link my/custom/HibernatePersistence (Module "deployment.ear.ear:main" from Service Module Loader)

          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.processor.PersistenceProviderProcessor.deploy(PersistenceProviderProcessor.java:76)

          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]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence

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

          at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0]

          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]

          ... 15 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence from [Module "deployment.ear.ear:main" from Service Module Loader]

          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]

          ... 20 more

       

      08:50:14,789 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."ear.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ear.ear".INSTALL: Failed to process phase INSTALL of deployment "ear.ear"

          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]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011426: Could not deploy application packaged persistence provider 'my.custom.HibernatePersistence'

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

          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.ClassNotFoundException: my.custom.HibernatePersistence from [Module "deployment.ear.ear:main" from Service Module Loader]

          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)

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

          ... 6 more

       

       

      'jar tf' on our ear file lists following contents:

       

      META-INF/

      META-INF/MANIFEST.MF

      lib/

      services-0.0.22-SNAPSHOT.jar

      META-INF/application.xml

      lib/guava-r07.jar

      lib/asm-analysis-3.2.jar

      lib/persistence_api-0.0.22-SNAPSHOT.jar

      lib/asm-3.2.jar

      lib/services_api-0.0.22-SNAPSHOT.jar

      lib/asm-tree-3.2.jar

      lib/utils-0.0.22-SNAPSHOT.jar

      lib/asm-util-3.2.jar

      lib/joda-time-2.0.jar

      lib/domain-0.0.22-SNAPSHOT.jar

      lib/antlr-2.7.7.jar

      lib/commons-codec-1.3.jar

      lib/asm-commons-3.2.jar

      lib/backport-util-concurrent-3.1.jar

      lib/commons-lang-2.4.jar

      lib/commons-io-1.4.jar

      lib/commons-logging-1.1.1.jar

      lib/persistence_impl-0.0.22-SNAPSHOT.jar

      META-INF/maven/

      META-INF/maven/de.patronas.opus.server/

      META-INF/maven/de.patronas.opus.server/ear/

      META-INF/maven/de.patronas.opus.server/ear/pom.xml

      META-INF/maven/de.patronas.opus.server/ear/pom.properties

       

      Any idea what we've done wrong?

       

      Thanks

        • 1. Re: AS 7 Custom Hibernate Persistence Provider in EAR
          Frank Langelage Master

          Do you use JPA with a persistence.xml in one of your jar files inside of the ear?

          If not, you'll have to add a dependency to the hibernate module into your MANIFEST.MF or add a jboss-deployment-structure.xml.

          • 2. Re: AS 7 Custom Hibernate Persistence Provider in EAR
            Scott Marlow Master

            You don't need to include the javax.persistence jars (same for some others as well).  See https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments and https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7 to see which jars are automatically included for you and how you can handle the others.

             

            The Hibernate module contains the different dependencies that are needed:

             

             

            <?xml version="1.0" encoding="UTF-8"?>
            
            <!--
              ~ JBoss, Home of Professional Open Source.
              ~ Copyright 2011, Red Hat, Inc., and individual contributors
              ~ as indicated by the @author tags. See the copyright.txt file in the
              ~ distribution for a full listing of individual contributors.
              ~
              ~ This is free software; you can redistribute it and/or modify it
              ~ under the terms of the GNU Lesser General Public License as
              ~ published by the Free Software Foundation; either version 2.1 of
              ~ the License, or (at your option) any later version.
              ~
              ~ This software is distributed in the hope that it will be useful,
              ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
              ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
              ~ Lesser General Public License for more details.
              ~
              ~ You should have received a copy of the GNU Lesser General Public
              ~ License along with this software; if not, write to the Free
              ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
              ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
              -->
            
            <!-- Represents the Hibernate 4.0.x module-->
            <module xmlns="urn:jboss:module:1.1" name="org.hibernate">
                <resources>
                    <resource-root path="hibernate-core-4.1.4.Final.jar"/>
                    <resource-root path="hibernate-entitymanager-4.1.4.Final.jar"/>
                    <resource-root path="hibernate-infinispan-4.1.4.Final.jar"/>
                    <!-- Insert resources here -->
                </resources>
            
                <dependencies>
                    <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.antlr"/>
                    <module name="org.apache.commons.collections"/>
                    <module name="org.dom4j"/>
                    <module name="org.infinispan" optional="true"/>
                    <module name="org.javassist"/>
                    <module name="org.jboss.as.jpa.hibernate" slot="4" optional="true"/>
                    <module name="org.jboss.logging"/>
                    <module name="org.hibernate.envers" services="import" optional="true"/>
                <module name="org.hibernate.commons-annotations"/>
                </dependencies>
            </module>
            

             

            Scott

            • 3. Re: AS 7 Custom Hibernate Persistence Provider in EAR
              Thomas Woelfle Newbie

              We have a persistence.xml file in the persistence_impl-0.0.22-SNAPSHOT.jar. There are no hibernate jars packaged in our ear file.

              • 4. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                Tomaz Cerar Master

                What does you MANIFEST.MF looks like?

                 

                I think you are missing dependancy on hibernate.

                 

                Try adding Dependencies: org.hibernate

                 

                it should probably make it work...

                • 5. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                  Thomas Woelfle Newbie

                  I've added the dependency to the MANIFEST.MF. Now following exception occurs:

                   

                  14:30:38,576 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."ear.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ear.ear".INSTALL: Failed to process phase INSTALL of deployment "ear.ear"

                      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]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

                      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

                  Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'my.custom.HibernatePersistence' not found

                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:555)

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

                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)

                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleEarDeployment(PersistenceUnitDeploymentProcessor.java:216)

                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:119)

                      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

                  • 6. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                    Tomaz Cerar Master

                    Hi,

                     

                    that is beter now.

                     

                    problem you have now has to do with deployment isolation between jars/wars inside ear.

                    just configure it right acorring to this:

                    https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7

                     

                     

                    --

                    tomaz

                    • 7. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                      Thomas Woelfle Newbie

                      Hi Tomaz,

                       

                      thanks for your reply.

                      As far as I understood from the AS7 Classloading documentation the deployment isolation default is that any classes/jars located in the 'lib' folder of an 'ear' application are per default visible to any ejb modules. Our custom HibernatePersistence implementation is located in the 'persistence_impl' jar file which is located in the 'lib' folder. Therefore it should be visible, shouldn't it? If not. Where do I have to declare the 'persistence_impl' (or the 'lib' folder?) as a dependency?

                       

                      Thanks,

                      Thoma

                      • 8. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                        Scott Marlow Master

                        Did you remove the javax.persistence jars from your ear lib yet (see my previous response)?  You don't need a dependency on the org.hibernate module since you are creating your own.  If you do this right, your custom Hibernate jars will be registered as an application deployment level persistence provider (available via javax.persistence.Persistence static api).  Including your own javax.persistence jars will break that.

                        • 9. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                          Thomas Woelfle Newbie

                          Neither the javax.persistence API jars nor any hibernate jars are part of our ear file. The 'persistence_api' and 'persistence_impl' jars located in the lib folder contain our DAO stuff but no javax.persistence API classes. Our custom persistence provider (located in 'lib/persistence_impl.jar') inherits from the org.hibernate.ejb.HibernatePersistence. Without the dependency to the 'org.hibernate' module an ClassNotFoundException is thrown complaining that 'org.hibernate.ejb.HibernatePersistence' cannot be found (see initial post).

                          • 10. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                            Scott Marlow Master

                            Above you mentioned persistence_api-0.0.22-SNAPSHOT.jar, which sounds like javax.persistence.  I assume you have since removed that.  You also mentioned other jars that duplicate other Hibernate dependencies. 

                             

                            Can you show us the current contents of your ear again (if it changed since your earlier message).

                            • 11. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                              Thomas Woelfle Newbie

                              'persistence_api-0.0.22-SNAPSHOT.jar' and 'persistence_impl-0.0.22-SNAPSHOT.jar' contain our application specific DAOs but no javax.persistence or hibernate specific stuff.

                              The contents have not changed since the first post. It is still:

                               

                              META-INF/

                              META-INF/MANIFEST.MF

                              lib/

                              services-0.0.22-SNAPSHOT.jar

                              META-INF/application.xml

                              lib/guava-r07.jar

                              lib/asm-analysis-3.2.jar

                              lib/persistence_api-0.0.22-SNAPSHOT.jar

                              lib/asm-3.2.jar

                              lib/services_api-0.0.22-SNAPSHOT.jar

                              lib/asm-tree-3.2.jar

                              lib/utils-0.0.22-SNAPSHOT.jar

                              lib/asm-util-3.2.jar

                              lib/joda-time-2.0.jar

                              lib/domain-0.0.22-SNAPSHOT.jar

                              lib/antlr-2.7.7.jar

                              lib/commons-codec-1.3.jar

                              lib/asm-commons-3.2.jar

                              lib/backport-util-concurrent-3.1.jar

                              lib/commons-lang-2.4.jar

                              lib/commons-io-1.4.jar

                              lib/commons-logging-1.1.1.jar

                              lib/persistence_impl-0.0.22-SNAPSHOT.jar

                              META-INF/maven/

                              META-INF/maven/de.patronas.opus.server/

                              META-INF/maven/de.patronas.opus.server/ear/

                              META-INF/maven/de.patronas.opus.server/ear/pom.xml

                              META-INF/maven/de.patronas.opus.server/ear/pom.properties

                              • 12. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                                Scott Marlow Master

                                Okay, I get it now.  Some of your other jars look like they are also duplicating existing modules in AS7 (ib/asm-3.2.jar).

                                 

                                I think that you could either package the Hibernate jars also with your ear, or you could create a custom (static) module for your custom persistence provider.

                                • 13. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                                  Thomas Woelfle Newbie

                                  I've packaged all Hibernate jars now in the ear but the result is still the same:

                                   

                                  10:22:29,911 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."ear.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ear.ear".INSTALL: Failed to process phase INSTALL of deployment "ear.ear"

                                      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]

                                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

                                      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

                                  Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'my.custom.HibernatePersistence' not found

                                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:555)

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

                                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)

                                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleEarDeployment(PersistenceUnitDeploymentProcessor.java:216)

                                      at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:119)

                                      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

                                   

                                  The content of the ear file is:

                                   

                                  META-INF/

                                  META-INF/MANIFEST.MF

                                  lib/

                                  business-0.0.22-SNAPSHOT.jar

                                  META-INF/application.xml

                                  META-INF/jboss-classloading.xml.backup

                                  META-INF/jboss-app.xml.backup

                                  lib/guava-r07.jar

                                  lib/solr-core-3.5.0.jar

                                  lib/lucene-spatial-3.5.0.jar

                                  lib/hibernate-jpa-2.0-api-1.0.1.Final.jar

                                  lib/paranamer-2.3.jar

                                  lib/jackson-core-asl-1.7.3.jar

                                  lib/lucene-stempel-3.5.0.jar

                                  lib/asm-analysis-3.2.jar

                                  lib/persistence_api-0.0.22-SNAPSHOT.jar

                                  lib/runtime-0.0.22-SNAPSHOT.jar

                                  lib/groovy-1.8.6.jar

                                  lib/jboss-marshalling-river-1.3.0.GA.jar

                                  lib/hibernate-entitymanager-4.0.1.Final.jar

                                  lib/ical4j-1.0.jar

                                  lib/solr-commons-csv-3.5.0.jar

                                  lib/asm-3.2.jar

                                  lib/business_api-0.0.22-SNAPSHOT.jar

                                  lib/asm-tree-3.2.jar

                                  lib/utils-0.0.22-SNAPSHOT.jar

                                  lib/hibernate-search-orm-4.1.1.Final.jar

                                  lib/jackson-mapper-asl-1.7.3.jar

                                  lib/hibernate-validator-4.2.0.Final.jar

                                  lib/lucene-memory-3.5.0.jar

                                  lib/hibernate-core-4.0.1.Final.jar

                                  lib/lucene-grouping-3.5.0.jar

                                  lib/lucene-highlighter-3.5.0.jar

                                  lib/rhq-pluginAnnotations-3.0.4.jar

                                  lib/asm-util-3.2.jar

                                  lib/joda-time-2.0.jar

                                  lib/jgroups-3.0.2.Final.jar

                                  lib/domain-0.0.22-SNAPSHOT.jar

                                  lib/snappy-java-1.0.1-rc3.jar

                                  lib/hibernate-search-analyzers-4.1.1.Final.jar

                                  lib/antlr-2.7.7.jar

                                  lib/commons-codec-1.3.jar

                                  lib/jboss-transaction-api-1.0.1.GA.jar

                                  lib/lucene-smartcn-3.5.0.jar

                                  lib/woodstox-core-asl-4.1.1.jar

                                  lib/asm-commons-3.2.jar

                                  lib/hibernate-search-engine-4.1.1.Final.jar

                                  lib/xml-apis-1.0.b2.jar

                                  lib/lucene-analyzers-3.5.0.jar

                                  lib/hibernate-infinispan-4.0.1.Final.jar

                                  lib/avro-1.5.1.jar

                                  lib/base_types-0.0.22-SNAPSHOT.jar

                                  lib/utils-0.0.4-SNAPSHOT.jar

                                  lib/jboss-logging-3.1.0.CR2.jar

                                  lib/lucene-misc-3.5.0.jar

                                  lib/dom4j-1.6.1.jar

                                  lib/backport-util-concurrent-3.1.jar

                                  lib/hibernate-search-4.1.1.Final.jar

                                  lib/solr-analysis-extras-3.5.0.jar

                                  lib/staxmapper-1.0.0.Final.jar

                                  lib/infinispan-core-5.1.0.CR3.jar

                                  lib/stax2-api-3.1.1.jar

                                  lib/commons-io-1.4.jar

                                  lib/commons-logging-1.1.1.jar

                                  lib/solr-solrj-3.5.0.jar

                                  lib/javassist-3.15.0-GA.jar

                                  lib/lucene-spellchecker-3.5.0.jar

                                  lib/jboss-marshalling-1.3.0.GA.jar

                                  lib/commons-lang-2.6.jar

                                  lib/persistence_impl-0.0.22-SNAPSHOT.jar

                                  lib/commons-collections-3.2.1.jar

                                  lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar

                                  lib/hibernate-commons-annotations-4.0.1.Final.jar

                                  lib/application-0.0.22-SNAPSHOT.jar

                                  lib/lucene-core-3.5.0.jar

                                  META-INF/maven/

                                  META-INF/maven/de.patronas.opus.server/

                                  META-INF/maven/de.patronas.opus.server/ear/

                                  META-INF/maven/de.patronas.opus.server/ear/pom.xml

                                  META-INF/maven/de.patronas.opus.server/ear/pom.properties

                                   

                                   

                                   

                                  The content in the MANIFEST.MF is:

                                   

                                  Dependencies: org.hibernate, org.slf4j

                                   

                                   

                                  Any ideas?

                                  • 14. Re: AS 7 Custom Hibernate Persistence Provider in EAR
                                    Scott Marlow Master

                                    Do you have the file META-INF/services/javax.persistence.spi.PersistenceProvider in your custom persistence provider jar?  What is it set to (should be my.custom.HibernatePersistence)?  The Hibernate persistence provider jar has it set to "org.hibernate.ejb.HibernatePersistence". 

                                     

                                    If you have the Hibernate jars included in your deployment, you shouldn't also have a MANIFEST.MF dependency on org.hibernate.

                                    1 2 Previous Next