7 Replies Latest reply on Jul 29, 2014 11:34 AM by mylos78

    Problems using Hibernate 3.6 with WildFly

    mylos78

      Dear all,

      I need some help with one web application which bundles the following Hibernate 3.6 libraries in the WEB-INF/lib folder:

      libs.png

      I've added the following persistence.xml which has the property jboss.as.jpa.providerModule set to "hibernate3-bundled".

      <persistence version="2.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_2_0.xsd">
         <persistence-unit name="primary">
      
            <jta-data-source>java:jboss/datasources/MySQLDS</jta-data-source>
            <properties>
               <!-- Properties for Hibernate -->
               <property name="hibernate.hbm2ddl.auto" value="create-drop" />
               <property name="hibernate.show_sql" value="false" />
               <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />
            </properties>
         </persistence-unit>
      </persistence>
      

      Once deployed, however the application issues the following exception:

      14:36:03,478 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"aem.war\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"aem.war\".FIRST_MODULE_USE: JBAS018733

      : Failed to process phase FIRST_MODULE_USE of deployment \"aem.war\"

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:

      JBAS011434: Persistence provider module load error application (class org.hibernate.jpa.HibernatePersistenceProvider)

          Caused by: org.jboss.modules.ModuleNotFoundException: application:main"}}

      14:36:03,522 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "aem.war" with deployment "aem.war"

      14:36:03,524 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit

      ."aem.war".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."xalan.war".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of deployment "aem.war"

       

      The exception ModuleNotFound lead me to think that it looks for Hibernate 3.6 into the application server modules, however in the WildFly-JPA migration guide it's not mentioned to install Hibernate 3.X as well.

      Any clue ?

      Thanks!