Buggy code:
public class DataSourcesExtension implements Extension { public static final String SUBSYSTEM_NAME = Constants . DATASOURCES ; private static final String RESOURCE_NAME = ( DataSourcesExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; @ Override public void initialize ( final ExtensionContext context ) { } private void registerDeploymentsModel ( final boolean registerRuntimeOnly , final SubsystemRegistration registration ) { ResourceDefinition deploymentsDef = new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( SUBSYSTEM , DataSourcesExtension . SUBSYSTEM_NAME ) , DataSourcesExtension . getResourceDescriptionResolver ( "deployed" ) ) ; final ManagementResourceRegistration deploymentsRegistration = registration . registerDeploymentModel ( deploymentsDef ) ; final ManagementResourceRegistration dataSources = deploymentsRegistration . registerSubModel ( PathElement . pathElement ( Constants . DATA_SOURCE ) , DataSourcesSubsystemProviders . DATA_SOURCE_DESC ) ; if ( registerRuntimeOnly ) { dataSources . registerOperationHandler ( "flush-idle-connection-in-pool" , DS_INSTANCE , DataSourcesSubsystemProviders . FLUSH_IDLE_CONNECTION_DESC , false ) ; dataSources . registerOperationHandler ( "flush-all-connection-in-pool" , PoolOperations . FlushAllConnectionInPool . DS_INSTANCE , DataSourcesSubsystemProviders . FLUSH_ALL_CONNECTION_DESC , false ) ; dataSources . registerOperationHandler ( "test-connection-in-pool" , PoolOperations . TestConnectionInPool . DS_INSTANCE , DataSourcesSubsystemProviders . TEST_CONNECTION_DESC , false ) ; } final ManagementResourceRegistration configAdapter = dataSources . registerSubModel ( PathElement . pathElement ( Constants . CONNECTION_PROPERTIES . getName ( ) ) , DataSourcesSubsystemProviders . CONNECTION_PROPERTIES_DESC ) ; for ( final SimpleAttributeDefinition attribute : DataSourcesSubsystemProviders . DATASOURCE_ATTRIBUTE ) { if ( ATTRIBUTES . contains ( attribute . getName ( ) ) ) { dataSources . registerReadOnlyAttribute ( attribute . getName ( ) , INSTANCE , RUNTIME ) ; } else { <START_BUG> dataSources . registerReadOnlyAttribute ( attribute . getName ( ) , null , RUNTIME ) ; <END_BUG> } } final ManagementResourceRegistration xaDataSources = deploymentsRegistration . registerSubModel ( PathElement . pathElement ( Constants . XA_DATASOURCE ) , DataSourcesSubsystemProviders . XA_DATA_SOURCE_DESC ) ; if ( registerRuntimeOnly ) { xaDataSources . registerOperationHandler ( "flush-idle-connection-in-pool" , DS_INSTANCE , DataSourcesSubsystemProviders . FLUSH_IDLE_CONNECTION_DESC , false ) ; xaDataSources . registerOperationHandler ( "flush-all-connection-in-pool" , PoolOperations . FlushAllConnectionInPool . DS_INSTANCE , DataSourcesSubsystemProviders . FLUSH_ALL_CONNECTION_DESC , false ) ; xaDataSources . registerOperationHandler ( "test-connection-in-pool" , PoolOperations . TestConnectionInPool . DS_INSTANCE , DataSourcesSubsystemProviders . TEST_CONNECTION_DESC , false ) ; } final ManagementResourceRegistration xadatasourcePropertyAdapter = xaDataSources . registerSubModel ( PathElement . pathElement ( Constants . XADATASOURCE_PROPERTIES . getName ( ) ) , DataSourcesSubsystemProviders . XADATASOURCE_PROPERTIES_DESC ) ; for ( final SimpleAttributeDefinition attribute : DataSourcesSubsystemProviders . XA_DATASOURCE_ATTRIBUTE ) { if ( ATTRIBUTES . contains ( attribute . getName ( ) ) ) { xaDataSources . registerReadOnlyAttribute ( attribute . getName ( ) , INSTANCE , RUNTIME ) ; } else { xaDataSources . registerReadOnlyAttribute ( attribute . getName ( ) , null , RUNTIME ) ; } } } @ Override public void initializeParsers ( final ExtensionParsingContext context ) { } public static final class DataSourceSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { static final DataSourcesExtension . DataSourceSubsystemParser INSTANCE = new DataSourcesExtension . DataSourceSubsystemParser ( ) ; @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } private void writeDS ( XMLExtendedStreamWriter writer , boolean isXADataSource , List < Property > propertyList ) throws XMLStreamException { } private void writeAttributeIfHas ( final XMLExtendedStreamWriter writer , final ModelNode node , final Recovery . Attribute attr , final String identifier ) throws XMLStreamException { } private void writeAttributeIfHas ( final XMLExtendedStreamWriter writer , final ModelNode node , final Driver . Attribute attr , final String identifier ) throws XMLStreamException { } private void writeAttributeIfHas ( final XMLExtendedStreamWriter writer , final ModelNode node , final DataSource . Attribute attr , final String identifier ) throws XMLStreamException { } private void writeProperty ( XMLExtendedStreamWriter writer , ModelNode node , String name , String value , String localName ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , String localName , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , XaDataSource . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , DataSource . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , DsSecurity . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , CommonPool . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , CommonXaPool . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , TimeOut . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , Validation . Tag element , String identifier ) throws XMLStreamException { } private void writeElementIfHas ( XMLExtendedStreamWriter writer , ModelNode node , Statement . Tag element , String identifier ) throws XMLStreamException { } private void writeEmptyElementIfHasAndTrue ( XMLExtendedStreamWriter writer , ModelNode node , String localName , String identifier ) throws XMLStreamException { } private void writeEmptyElementIfHasAndTrue ( XMLExtendedStreamWriter writer , ModelNode node , Statement . Tag element , String identifier ) throws XMLStreamException { } private void writeEmptyElementIfHasAndTrue ( XMLExtendedStreamWriter writer , ModelNode node , CommonXaPool . Tag element , String identifier ) throws XMLStreamException { } private void writeEmptyElementIfHasAndTrue ( XMLExtendedStreamWriter writer , ModelNode node , TimeOut . Tag element , String identifier ) throws XMLStreamException { } private boolean hasAnyOf ( ModelNode node , SimpleAttributeDefinition ... names ) { } private boolean has ( ModelNode node , String name ) { } @ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > list ) throws XMLStreamException { } } private static class DataSourcesSubsystemDescribeHandler implements OperationStepHandler , DescriptionProvider { static final DataSourcesExtension . DataSourcesSubsystemDescribeHandler INSTANCE = new DataSourcesExtension . DataSourcesSubsystemDescribeHandler ( ) ; public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { }

Fix:
dataSources . registerReadOnlyAttribute ( attribute . getName ( ) , XMLDataSourceRuntimeHandler . INSTANCE , RUNTIME ) ;