Buggy code:
class OSGiSubsystemAdd extends AbstractBoottimeAddStepHandler { static final OSGiSubsystemAdd INSTANCE = new OSGiSubsystemAdd ( ) ; private OSGiRuntimeResource resource ; private OSGiSubsystemAdd ( ) { } @ Override protected Resource createResource ( OperationContext context ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) { } @ Override protected void performBoottime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) { OSGiLogger . LOGGER . infoActivatingSubsystem ( ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final Activation activationMode = getActivationMode ( operation ) ; final InitialDeploymentTracker deploymentTracker = new InitialDeploymentTracker ( context , activationMode ) ; context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { newControllers . add ( PersistentBundlesIntegration . addService ( serviceTarget , deploymentTracker ) ) ; newControllers . add ( FrameworkBootstrapService . addService ( serviceTarget , resource , verificationHandler ) ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } } , RUNTIME ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { @ Override protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_OSGI_MANIFEST , new OSGiManifestStructureProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_BUNDLE_JAR_IN_EAR , new BundleSubDeploymentMarkingProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_BUNDLE_INFO , new OSGiBundleInfoParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_PROPERTIES , new OSGiXServiceParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_DEPLOYMENT , new BundleDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_SUBSYSTEM_ACTIVATOR , new SubsystemActivateProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , REGISTER , REGISTER_BUNDLE_INSTALL , new org . jboss . as . osgi . deployment . BundleInstallProcessor ( deploymentTracker ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , CONFIGURE_MODULE , CONFIGURE_RESOLVE_BUNDLE , new BundleResolveProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , CONFIGURE_MODULE , CONFIGURE_RESOLVE_SUB_BUNDLE , new BundleResolveSubProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_BUNDLE_CONTEXT_BINDING , new BundleContextBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_RESOLVER_MODULE , new ModuleRegisterProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_BUNDLE_ACTIVATE , new BundleActivateProcessor ( ) ) ; } } , RUNTIME ) ; ClassLoader classLoader = OSGiSubsystemExtension . class . getClassLoader ( ) ; Iterator < OSGiSubsystemExtension > services = ServiceLoader . load ( OSGiSubsystemExtension . class , classLoader ) . iterator ( ) ; while ( services . hasNext ( ) ) { OSGiSubsystemExtension extension = services . next ( ) ; extension . performBoottime ( context , operation , model , verificationHandler , newControllers ) ; } newControllers . add ( SubsystemState . addService ( serviceTarget , activationMode ) ) ; } private Activation getActivationMode ( ModelNode operation ) { } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_BUNDLE_SUB_DEPLOYMENT , new BundleSubDeploymentMarkingProcessor ( ) ) ;