Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6827

After container restart, datamodel bundle is not able to expose the Entitymanagerfactory,.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • jboss-fuse-6.1
    • Fabric8 v1, Hibernate
    • None
    • % %
    • Hide
      • Unzip reproducer_01849577.zip. Build it with `mvn clean install`.
      • Setup Fabric environment 6.1.0 R4P3.
      • Unzip profile.zip, we can add these profiles to existing fabric environment as:
        git add BaseWorkerProfile.profile/*
        git commit -m "BaseWorkerProfile.profile"
        git add ECFProfile.profile/*
        git commit -m "ECFProfile.profile"
        git push
        
      • Now add ECFProfile to container
        container-create-child root worker
        container-add-profile worker ECFProfile
        
      • It should run for the first time, it would take around 2 to 3 minutes to contact remote database. But if we stop and start container again, ECF DAO API doesn't start up properly. Datamodel bundle is ECF DAP API.
        JBossFuse:admin@abc> list -t 0|grep ECF
        [ 837] [Active     ] [Created     ] [       ] [   60] ECF :: Datasource (1.0.0.pomVersion)
        [ 838] [Active     ] [            ] [       ] [   60] ECF DAO API (1.0.0.pomVersion)
        [ 839] [Active     ] [GracePeriod ] [       ] [   60] ECF Rest Service (1.0.0.pomVersion)
        JBossFuse:admin@abc> ls 837
        
        ECF :: Datasource (837) provides:
        ---------------------------------
        aries.xa.aware = false
        aries.xa.name = NonXA_h2memory
        datasource.name = NonXA_h2memory
        name = NonXA_h2memory
        objectClass = javax.sql.DataSource
        osgi.jndi.service.name = jdbc/ecfClaimSummaryDatasource
        osgi.service.blueprint.compname = claimDataSourceOracle
        service.id = 379
        ----
        objectClass = org.osgi.service.blueprint.container.BlueprintContainer
        osgi.blueprint.container.symbolicname = ecf_a_a_datasource
        osgi.blueprint.container.version = 1.0.0.pomVersion
        service.id = 380
        JBossFuse:admin@abc> ls -u 838
        JBossFuse:admin@abc> 
        
      • Above output of 'ls -u 838' is empty, thus it is not able to use the Datasource service from bundle 837. Finally bundle 839 which uses EMF fails and container goes to failed state.
      • In case of success, which I normally observe while assiging profile to container.:
        JBossFuse:admin@abc> list -t 0|grep ECF
        [ 985] [Active     ] [Created     ] [       ] [   60] ECF :: Datasource (1.0.0.pomVersion)
        [ 986] [Active     ] [            ] [       ] [   60] ECF DAO API (1.0.0.pomVersion)
        [ 987] [Active     ] [Created     ] [       ] [   60] ECF Rest Service (1.0.0.pomVersion)
        JBossFuse:admin@abc> ls 986
        
        ECF DAO API (986) provides:
        ---------------------------
        objectClass = javax.persistence.EntityManagerFactory
        org.apache.aries.jpa.container.managed = true
        org.apache.aries.jpa.default.unit.name = false
        osgi.unit.name = ecf-oracle-persistence-unit
        osgi.unit.provider = org.hibernate.ejb.HibernatePersistence
        osgi.unit.version = 1.0.0.pomVersion
        service.id = 707
        JBossFuse:admin@abc> 
        
        
        JBossFuse:admin@abc> ls -u 986
        
        ECF DAO API (986) uses:
        -----------------------
        objectClass = javax.naming.spi.ObjectFactory
        osgi.jndi.url.scheme = osgi, aries
        service.id = 568
        ----
        aries.xa.aware = false
        aries.xa.name = NonXA_h2memory
        datasource.name = NonXA_h2memory
        name = NonXA_h2memory
        objectClass = javax.sql.DataSource
        osgi.jndi.service.name = jdbc/ecfClaimSummaryDatasource
        osgi.service.blueprint.compname = claimDataSourceOracle
        service.id = 702
        JBossFuse:admin@abc> 
        
      Show
      Unzip reproducer_01849577.zip. Build it with `mvn clean install`. Setup Fabric environment 6.1.0 R4P3. Unzip profile.zip, we can add these profiles to existing fabric environment as: git add BaseWorkerProfile.profile/* git commit -m "BaseWorkerProfile.profile" git add ECFProfile.profile/* git commit -m "ECFProfile.profile" git push Now add ECFProfile to container container-create-child root worker container-add-profile worker ECFProfile It should run for the first time, it would take around 2 to 3 minutes to contact remote database. But if we stop and start container again, ECF DAO API doesn't start up properly. Datamodel bundle is ECF DAP API. JBossFuse:admin@abc> list -t 0|grep ECF [ 837] [Active ] [Created ] [ ] [ 60] ECF :: Datasource (1.0.0.pomVersion) [ 838] [Active ] [ ] [ ] [ 60] ECF DAO API (1.0.0.pomVersion) [ 839] [Active ] [GracePeriod ] [ ] [ 60] ECF Rest Service (1.0.0.pomVersion) JBossFuse:admin@abc> ls 837 ECF :: Datasource (837) provides: --------------------------------- aries.xa.aware = false aries.xa.name = NonXA_h2memory datasource.name = NonXA_h2memory name = NonXA_h2memory objectClass = javax.sql.DataSource osgi.jndi.service.name = jdbc/ecfClaimSummaryDatasource osgi.service.blueprint.compname = claimDataSourceOracle service.id = 379 ---- objectClass = org.osgi.service.blueprint.container.BlueprintContainer osgi.blueprint.container.symbolicname = ecf_a_a_datasource osgi.blueprint.container.version = 1.0.0.pomVersion service.id = 380 JBossFuse:admin@abc> ls -u 838 JBossFuse:admin@abc> Above output of 'ls -u 838' is empty, thus it is not able to use the Datasource service from bundle 837. Finally bundle 839 which uses EMF fails and container goes to failed state. In case of success, which I normally observe while assiging profile to container.: JBossFuse:admin@abc> list -t 0|grep ECF [ 985] [Active ] [Created ] [ ] [ 60] ECF :: Datasource (1.0.0.pomVersion) [ 986] [Active ] [ ] [ ] [ 60] ECF DAO API (1.0.0.pomVersion) [ 987] [Active ] [Created ] [ ] [ 60] ECF Rest Service (1.0.0.pomVersion) JBossFuse:admin@abc> ls 986 ECF DAO API (986) provides: --------------------------- objectClass = javax.persistence.EntityManagerFactory org.apache.aries.jpa.container.managed = true org.apache.aries.jpa. default .unit.name = false osgi.unit.name = ecf-oracle-persistence-unit osgi.unit.provider = org.hibernate.ejb.HibernatePersistence osgi.unit.version = 1.0.0.pomVersion service.id = 707 JBossFuse:admin@abc> JBossFuse:admin@abc> ls -u 986 ECF DAO API (986) uses: ----------------------- objectClass = javax.naming.spi.ObjectFactory osgi.jndi.url.scheme = osgi, aries service.id = 568 ---- aries.xa.aware = false aries.xa.name = NonXA_h2memory datasource.name = NonXA_h2memory name = NonXA_h2memory objectClass = javax.sql.DataSource osgi.jndi.service.name = jdbc/ecfClaimSummaryDatasource osgi.service.blueprint.compname = claimDataSourceOracle service.id = 702 JBossFuse:admin@abc>

            rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
            rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: