1 Reply Latest reply on Apr 9, 2015 9:34 PM by yhsu2015

    Wildfly 8.2 Final with two persistence units?

    Max Vornovskykh Newbie

      Hi.


      Our company is trying to migrate from jboss 6.1 to Wildfly 8.2.


      Everything works fine untill we deploy two jar's with two different persistence units (separate persistence.xml files in both ejb-jars).


      Here is the first persistence.xml (no entities in it):

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
         <persistence-unit name="ejb3-documents">
             <jta-data-source>java:/PostgresDS</jta-data-source>
             <properties>
                 <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect"/>
                 <!-- property name="hibernate.hbm2ddl.auto" value="create"/ -->
                 <!-- property name="hibernate.show_sql" value="true"/ -->
             </properties>
         </persistence-unit>
      </persistence>
      
      
      

       

      And here is the second one:

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
         <persistence-unit name="ejb3-kernel">
             <jta-data-source>java:/PostgresDS</jta-data-source>
              <class>ourcompany.ejb3.kernel.persistence.UserAccount</class>     
              ....
             <properties>
                 <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect"/>
                 <!-- property name="hibernate.hbm2ddl.auto" value="create"/ -->
                 <!-- property name="hibernate.show_sql" value="true"/ -->
             </properties>
         </persistence-unit>
      </persistence>
      
      
      

       

      During deployment process I get this errors in my server.log:

      2015-01-20 10:13:21,000 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "ourcompany-platform-app.ear")]) - failure description: {
          "JBAS014671: Failed services" => {
              "jboss.persistenceunit.\"ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents\".__FIRST_PHASE__" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents\".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype
          Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype",
              "jboss.persistenceunit.\"ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel\".__FIRST_PHASE__" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel\".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype
          Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype"
          },
          "JBAS014771: Services with missing/unavailable dependencies" => [
              "jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-gwt-admin.war\".INSTALL is missing [jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-client.war\".deploymentCompleteService]",
              "jboss.deployment.unit.\"ourcompany-platform-app.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"ourcompany-platform-app.ear\".beanmanager]",
              "jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-admin.war\".INSTALL is missing [jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"ejb3-documents.jar\".deploymentCompleteService, jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"ejb3-documents.jar\".INSTALL]",
              "jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-gwt-partner.war\".INSTALL is missing [jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-gwt-admin.war\".deploymentCompleteService]",
              "jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-gwt-customer.war\".INSTALL is missing [jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-gwt-partner.war\".deploymentCompleteService]",
              "jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-client.war\".INSTALL is missing [jboss.deployment.subunit.\"ourcompany-platform-app.ear\".\"web-admin.war\".deploymentCompleteService]"
          ]
      }
      2015-01-20 10:13:21,042 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "ourcompany-platform-app.ear" (runtime-name : "ourcompany-platform-app.ear")
      2015-01-20 10:13:21,042 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "jackrabbit-jca.rar" (runtime-name : "jackrabbit-jca.rar")
      2015-01-20 10:13:21,044 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."ejb3-documents.jar".INSTALL (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-admin.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."ejb3-documents.jar".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-admin.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-admin.war".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-client.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-client.war".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-admin.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-admin.war".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-partner.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-partner.war".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-customer.war".INSTALL]
            service jboss.deployment.unit."ourcompany-platform-app.ear".beanmanager (missing) dependents: [service jboss.deployment.unit."ourcompany-platform-app.ear".weld.weldClassIntrospector]
      JBAS014777:   Services which failed to start:      service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype
            service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.spi.EnversIntegrator not a subtype
      
      
      2015-01-20 10:13:21,277 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015974: Stopped subdeployment (runtime-name: ejb3-kernel.jar) in 12ms
      2015-01-20 10:13:21,277 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015974: Stopped subdeployment (runtime-name: ejb3-documents.jar) in 12ms
      2015-01-20 10:13:21,279 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: web-admin.war) in 15ms
      2015-01-20 10:13:21,280 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015974: Stopped subdeployment (runtime-name: web-gwt-customer.war) in 15ms
      2015-01-20 10:13:21,280 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: web-gwt-partner.war) in 16ms
      2015-01-20 10:13:21,281 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015974: Stopped subdeployment (runtime-name: web-gwt-admin.war) in 16ms
      2015-01-20 10:13:21,281 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015974: Stopped subdeployment (runtime-name: web-client.war) in 16ms
      2015-01-20 10:13:21,346 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment ourcompany-platform-app.ear (runtime-name: ourcompany-platform-app.ear) in 82ms
      2015-01-20 10:13:21,563 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "ourcompany-platform-app.ear" (runtime-name: "ourcompany-platform-app.ear")
      2015-01-20 10:13:21,564 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:8990/management
      2015-01-20 10:13:21,565 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:8990
      2015-01-20 10:13:21,565 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-admin.war".INSTALL (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-client.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-client.war".INSTALL (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-admin.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-admin.war".INSTALL (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-partner.war".INSTALL]
            service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-partner.war".INSTALL (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-customer.war".INSTALL]
            service jboss.naming.context.java.module.ourcompany-platform-app.web-admin (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-admin.war".INSTALL]
            service jboss.naming.context.java.module.ourcompany-platform-app.web-client (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-client.war".INSTALL]
            service jboss.naming.context.java.module.ourcompany-platform-app.web-gwt-admin (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-admin.war".INSTALL]
            service jboss.naming.context.java.module.ourcompany-platform-app.web-gwt-customer (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-customer.war".INSTALL]
            service jboss.naming.context.java.module.ourcompany-platform-app.web-gwt-partner (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."web-gwt-partner.war".INSTALL]
            service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents".__FIRST_PHASE__ (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."ejb3-documents.jar".POST_MODULE]
            service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel".__FIRST_PHASE__ (missing) dependents: [service jboss.deployment.subunit."ourcompany-platform-app.ear"."ejb3-kernel.jar".POST_MODULE]
      JBAS014777:   Services which failed to start:      service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-kernel.jar#ejb3-kernel".__FIRST_PHASE__
            service jboss.persistenceunit."ourcompany-platform-app.ear/ejb3-documents.jar#ejb3-documents".__FIRST_PHASE__
      
      
      2015-01-20 10:13:21,565 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 8175ms - Started 256 of 321 services (116 services are lazy, passive or on-demand)
      
      
      

       

      Here is deployment structure. Persistence.xml's placed in ejb3-kernel.jar and ejb3-documents.jar.

      picture.PNG

      By the way, when I remove ejb3-documents.jar from deployment and restart the app server, wildfly starts successfully

       

      Any idea? Please, help!