Buggy code:
} } if ( cache . hasDefined ( STORE ) ) { ModelNode store = cache . get ( STORE ) ; FluentConfiguration . LoadersConfig fluentStores = fluent . loaders ( ) ; fluentStores . shared ( ( store . hasDefined ( SHARED ) ? store . get ( SHARED ) . asBoolean ( ) : false ) ) ; fluentStores . preload ( ( store . hasDefined ( PRELOAD ) ? store . get ( PRELOAD ) . asBoolean ( ) : false ) ) ; fluentStores . passivation ( ( store . hasDefined ( PASSIVATION ) ? store . get ( PASSIVATION ) . asBoolean ( ) : true ) ) ; CacheStoreConfig storeConfig = this . buildCacheStore ( builder , store ) ; storeConfig . singletonStore ( ) . enabled ( ( store . hasDefined ( SINGLETON ) ? store . get ( SINGLETON ) . asBoolean ( ) : false ) ) ; storeConfig . fetchPersistentState ( ( store . hasDefined ( FETCH_STATE ) ? store . get ( FETCH_STATE ) . asBoolean ( ) : true ) ) ; storeConfig . purgeOnStartup ( ( store . hasDefined ( PURGE ) ? store . get ( PURGE ) . asBoolean ( ) : true ) ) ; if ( ( store . hasDefined ( PROPERTY ) ) && ( storeConfig instanceof AbstractCacheStoreConfig ) ) { Properties properties = new Properties ( ) ; for ( Property property : store . get ( PROPERTY ) . asPropertyList ( ) ) { properties . setProperty ( property . getName ( ) , property . getValue ( ) . asString ( ) ) ; } ( ( AbstractCacheStoreConfig ) ( storeConfig ) ) . setProperties ( properties ) ; } fluentStores . addCacheLoader ( storeConfig ) ; } configurations . put ( cacheName , configuration ) ; StartMode startMode = ( cache . hasDefined ( START ) ) ? StartMode . valueOf ( cache . get ( START ) . asString ( ) ) : StartMode . LAZY ; ServiceBuilder < Cache < Object , Object > > cacheBuilder = new CacheService < Object , Object > ( cacheName ) . build ( target , serviceName ) . addDependency ( bindingName ) . setInitialMode ( startMode . getMode ( ) ) ; if ( cacheName . equals ( defaultCache ) ) { cacheBuilder . addAliases ( CacheService . getServiceName ( name , null ) ) ; } cacheBuilder . install ( ) ; } if ( ! ( configurations . containsKey ( defaultCache ) ) ) { throw new IllegalArgumentException ( String . format ( "%s<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>default<seq2seq4repair_space>cache.<seq2seq4repair_space>The<seq2seq4repair_space>%s<seq2seq4repair_space>cache<seq2seq4repair_space>container<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>a<seq2seq4repair_space>cache<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>name" , defaultCache , name ) ) ; } if ( requiresTransport ) { CacheContainerAdd . Transport transportConfig = new CacheContainerAdd . Transport ( ) ; String stack = null ; if ( operation . hasDefined ( TRANSPORT ) ) { ModelNode transport = operation . get ( TRANSPORT ) ; if ( transport . hasDefined ( STACK ) ) { stack = transport . get ( STACK ) . asString ( ) ; } this . addExecutorDependency ( builder , transport , EXECUTOR , transportConfig . getExecutorInjector ( ) ) ; if ( transport . hasDefined ( LOCK_TIMEOUT ) ) { transportConfig . setLockTimeout ( transport . get ( LOCK_TIMEOUT ) . asLong ( ) ) ; } if ( transport . hasDefined ( SITE ) ) { transportConfig . setSite ( transport . get ( SITE ) . asString ( ) ) ; } if ( transport . hasDefined ( RACK ) ) { transportConfig . setRack ( transport . get ( RACK ) . asString ( ) ) ; } if ( transport . hasDefined ( MACHINE ) ) { transportConfig . setMachine ( transport . get ( MACHINE ) . asString ( ) ) ; } } <START_BUG> builder . addDependency ( ( stack != null ? ChannelFactoryService . getServiceName ( stack ) : ChannelFactoryService . getServiceName ( ) ) , ChannelFactory . class , transportConfig . getChannelFactoryInjector ( ) ) ; <END_BUG> builder . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , transportConfig . getEnvironmentInjector ( ) ) ; config . setTransport ( transportConfig ) ; } this . addExecutorDependency ( builder , operation , LISTENER_EXECUTOR , config . getListenerExecutorInjector ( ) ) ; this . addScheduledExecutorDependency ( builder , operation , EVICTION_EXECUTOR , config . getEvictionExecutorInjector ( ) ) ; this . addScheduledExecutorDependency ( builder , operation , REPLICATION_QUEUE_EXECUTOR , config . getReplicationQueueExecutorInjector ( ) ) ; builder . install ( ) ; resultHandler . handleResultComplete ( ) ; } catch ( Throwable e ) { e . printStackTrace ( System . err ) ; } } private void addExecutorDependency ( ServiceBuilder < CacheContainer > builder , ModelNode model , String key , Injector < Executor > injector ) { if ( model . hasDefined ( key ) ) { builder . addDependency ( ThreadsServices . executorName ( model . get ( key ) . asString ( ) ) , Executor . class , injector ) ; } } private void addScheduledExecutorDependency ( ServiceBuilder < CacheContainer > builder , ModelNode model , String key , Injector < ScheduledExecutorService > injector ) { if ( model . hasDefined ( key ) ) { builder . addDependency ( ThreadsServices . executorName ( model . get ( key ) . asString ( ) ) , ScheduledExecutorService . class , injector ) ; } } private CacheStoreConfig buildCacheStore ( ServiceBuilder < CacheContainer > builder , ModelNode store ) { if ( store . hasDefined ( CLASS ) ) { String className = store . get ( CLASS ) . asString ( ) ; try { CacheStore cacheStore = Class . forName ( className ) . asSubclass ( CacheStore . class ) . newInstance ( ) ; return cacheStore . getConfigurationClass ( ) . asSubclass ( CacheStoreConfig . class ) . newInstance ( ) ;

Fix:
builder . addDependency ( ChannelFactoryService . getServiceName ( stack ) , ChannelFactory . class , transportConfig . getChannelFactoryInjector ( ) ) ;