Buggy code:
final class ServletContainerAdd extends AbstractBoottimeAddStepHandler { static final ServletContainerAdd INSTANCE = new ServletContainerAdd ( ) ; ServletContainerAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } public void installRuntimeServices ( OperationContext context , ModelNode model , List < ServiceController < ? > > newControllers , String name ) throws OperationFailedException { final ModelNode fullModel = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; SessionCookieConfig config = SessionCookieDefinition . INSTANCE . getConfig ( context , fullModel . get ( SessionCookieDefinition . INSTANCE . getPathElement ( ) . getKeyValuePair ( ) ) ) ; <START_BUG> boolean persistentSessions = PersistentSessionsDefinition . isEnabled ( context , fullModel . get ( PersistentSessionsDefinition . INSTANCE . getPathElement ( ) . getKeyValuePair ( ) ) ) ; <END_BUG> final boolean allowNonStandardWrappers = ALLOW_NON_STANDARD_WRAPPERS . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final ModelNode bufferCacheValue = DEFAULT_BUFFER_CACHE . resolveModelAttribute ( context , model ) ; final String bufferCache = ( bufferCacheValue . isDefined ( ) ) ? bufferCacheValue . asString ( ) : null ; JSPConfig jspConfig = JspDefinition . INSTANCE . getConfig ( context , fullModel . get ( JspDefinition . INSTANCE . getPathElement ( ) . getKeyValuePair ( ) ) ) ; final String stackTracesString = STACK_TRACE_ON_ERROR . resolveModelAttribute ( context , model ) . asString ( ) ; final ModelNode defaultEncodingValue = DEFAULT_ENCODING . resolveModelAttribute ( context , model ) ; final String defaultEncoding = ( defaultEncodingValue . isDefined ( ) ) ? defaultEncodingValue . asString ( ) : null ; final boolean useListenerEncoding = USE_LISTENER_ENCODING . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final ServletContainerService container = new ServletContainerService ( allowNonStandardWrappers , ServletStackTraces . valueOf ( stackTracesString . toUpperCase ( ) . replace ( '-' , '_' ) ) , config , jspConfig , defaultEncoding , useListenerEncoding ) ; final ServiceTarget target = context . getServiceTarget ( ) ; final ServiceBuilder < ServletContainerService > builder = target . addService ( SERVLET_CONTAINER . append ( name ) , container ) ; if ( bufferCache != null ) { builder . addDependency ( SERVICE_NAME . append ( bufferCache ) , DirectBufferCache . class , container . getBufferCacheInjectedValue ( ) ) ; } if ( persistentSessions ) { builder . addDependency ( AbstractPersistentSessionManager . SERVICE_NAME , SessionPersistenceManager . class , container . getSessionPersistenceManagerInjectedValue ( ) ) ; } newControllers . add ( builder . setInitialMode ( ON_DEMAND ) . install ( ) ) ; } }

Fix:
boolean persistentSessions = PersistentSessionsDefinition . isEnabled ( context , fullModel . get ( SessionCookieDefinition . INSTANCE . getPathElement ( ) . getKeyValuePair ( ) ) ) ;