Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4814

Cannot activate OSGi subsystem with disabled bundle deployments

XMLWordPrintable

      Occurs with JBoss 7.1.2.Final (EAP). Posting here in OSGI, since other commits of the file were also related to this component, please move if desired.

      When having deployments with attribute enabled="false" in domain.xml, the service jboss.osgi.as.initial.deployments.COMPLETE will not start-up, since in org.jboss.as.osgi.service.PersistentBundlesIntegration.InitialDeploymentTracker all deployments are read-in and only after all were deployed it is considered complete - in contrast to condition "after all enabled deployments are deployed"

      Following error message appears:

      INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
      JBAS014775: Neue fehlende/unbefriedigte Abhängigkeiten: (this is German, in English. sth. like Missing/unresolved dependencies)
            service jbosgi.integration.PersistentBundlesHandler.COMPLETE (missing) dependents: [service jbosgi.framework.INIT]
            service jboss.osgi.as.initial.deployments.COMPLETE (missing) dependents: [service jbosgi.integration.PersistentBundlesHandler]
      ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.2.Final "Steropes" started (with errors) in 40516ms - Started 5594 of 5693 services (2 services failed or missing dependencies, 93 services are passive or on-demand)
      

      Extract from https://github.com/jbossas/jboss-as/blob/master/build/src/main/resources/docs/schema/jboss-as-config_1_3.xsd which shows the configuration attribute:

      <xs:complexType name="server-groupDeploymentType">
              <xs:annotation>
                  <xs:documentation>A deployment that has been mapped to a server group.</xs:documentation>
              </xs:annotation>
              <xs:complexContent>
                  <xs:extension base="base-deploymentType">
                      <xs:attribute name="enabled" use="optional" type="xs:boolean" default="true">
                          <xs:annotation>
                              <xs:documentation>Whether the deployment deploy automatically when the server starts up.
                              </xs:documentation>
                          </xs:annotation>
                      </xs:attribute>
                  </xs:extension>
              </xs:complexContent>
          </xs:complexType>
      

      e.g. this would be a disabled deployment:

      <deployment enabled="false" name="com.company.project.jar" runtime-name="com.company.project.jar"/>
      

      I will attach a proposed patch, doing a simple check for an enabled="false" attribute.

              tdiesler@redhat.com Thomas Diesler
              r.neubauer@seeburger.de Rico Neubauer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: