Buggy code:
public class FrameworkBootstrapService implements Service < Void > { static final ServiceName FRAMEWORK_BOOTSTRAP_NAME = OSGiConstants . SERVICE_BASE_NAME . append ( "framework" , "bootstrap" ) ; static final String MAPPED_OSGI_SOCKET_BINDINGS = "org.jboss.as.osgi.socket.bindings" ; private final InjectedValue < ServerEnvironment > injectedServerEnvironment = new InjectedValue < ServerEnvironment > ( ) ; private final InjectedValue < SubsystemState > injectedSubsystemState = new InjectedValue < SubsystemState > ( ) ; private final List < SubsystemExtension > extensions ; private final OSGiRuntimeResource resource ; public static ServiceController < Void > addService ( ServiceTarget target , OSGiRuntimeResource resource , List < SubsystemExtension > extensions , ServiceVerificationHandler verificationHandler ) { } private FrameworkBootstrapService ( OSGiRuntimeResource resource , List < SubsystemExtension > extensions ) { } @ Override public synchronized void start ( StartContext context ) throws StartException { ServiceController < ? > controller = context . getController ( ) ; OSGiLogger . LOGGER . tracef ( "Starting:<seq2seq4repair_space>%s<seq2seq4repair_space>in<seq2seq4repair_space>mode<seq2seq4repair_space>%s" , controller . getName ( ) , controller . getMode ( ) ) ; try { ServiceContainer serviceContainer = context . getController ( ) . getServiceContainer ( ) ; SubsystemState subsystemState = injectedSubsystemState . getValue ( ) ; Map < String , Object > props = new HashMap < String , Object > ( subsystemState . getProperties ( ) ) ; setupIntegrationProperties ( context , props ) ; Module coreFrameworkModule = ( ( org . jboss . modules . ModuleClassLoader ) ( FrameworkBuilder . class . getClassLoader ( ) ) ) . getModule ( ) ; Module . registerURLStreamHandlerFactoryModule ( coreFrameworkModule ) ; Module . registerContentHandlerFactoryModule ( coreFrameworkModule ) ; ServiceTarget serviceTarget = context . getChildTarget ( ) ; JAXPServiceProvider . addService ( serviceTarget ) ; ResolverService . addService ( serviceTarget ) ; RepositoryService . addService ( serviceTarget ) ; FrameworkBuilder builder = new FrameworkBuilder ( props ) ; builder . setServiceContainer ( serviceContainer ) ; builder . setServiceTarget ( serviceTarget ) ; <START_BUG> builder . installIntegrationService ( serviceContainer , serviceTarget , new BundleInstallIntegration ( ) ) ; <END_BUG> builder . installIntegrationService ( serviceContainer , serviceTarget , new FrameworkModuleIntegration ( props ) ) ; builder . installIntegrationService ( serviceContainer , serviceTarget , new ModuleLoaderIntegration ( ) ) ; builder . installIntegrationService ( serviceContainer , serviceTarget , new SystemServicesIntegration ( resource , extensions ) ) ; Activation activation = subsystemState . getActivationPolicy ( ) ; if ( activation == ( Activation . EAGER ) ) { builder . installIntegrationService ( serviceContainer , serviceTarget , new BootstrapBundlesIntegration ( ) ) ; builder . installIntegrationService ( serviceContainer , serviceTarget , new PersistentBundlesIntegration ( ) ) ; builder . setInitialMode ( ACTIVE ) ; } else { builder . addExcludedService ( BOOTSTRAP_BUNDLES_INSTALL ) ; builder . addExcludedService ( PERSISTENT_BUNDLES_INSTALL ) ; builder . setInitialMode ( LAZY ) ; } builder . createFrameworkServices ( true ) ; } catch ( Throwable th ) { throw OSGiMessages . MESSAGES . startFailedToCreateFrameworkServices ( th ) ; } } @ Override public synchronized void stop ( StopContext context ) { } @ Override public Void getValue ( ) throws IllegalStateException { } private void setupIntegrationProperties ( StartContext context , Map < String , Object > props ) { } }

Fix:
builder . installIntegrationService ( serviceContainer , serviceTarget , new BundleLifecycleIntegration ( ) ) ;