Buggy code:
public class LdapAuthenticationResourceDefinition extends SimpleResourceDefinition { public static final SimpleAttributeDefinition CONNECTION = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . CONNECTION , ModelType . STRING , false ) . setValidator ( new StringLengthValidator ( 1 , Integer . MAX_VALUE , false , false ) ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final SimpleAttributeDefinition BASE_DN = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . BASE_DN , ModelType . STRING , false ) . setValidator ( new StringLengthValidator ( 1 , Integer . MAX_VALUE , false , false ) ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final SimpleAttributeDefinition RECURSIVE = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . RECURSIVE , ModelType . BOOLEAN , true ) . setDefaultValue ( new ModelNode ( false ) ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final SimpleAttributeDefinition USER_DN = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . USER_DN , ModelType . STRING , true ) . setValidator ( new StringLengthValidator ( 1 , Integer . MAX_VALUE , true , false ) ) . setDefaultValue ( new ModelNode ( UserLdapCallbackHandler . DEFAULT_USER_DN ) ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final SimpleAttributeDefinition USERNAME_FILTER = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . USERNAME_ATTRIBUTE , ModelType . STRING , false ) . setXmlName ( "attribute" ) . setAlternatives ( ModelDescriptionConstants . ADVANCED_FILTER ) . setValidator ( new StringLengthValidator ( 1 , Integer . MAX_VALUE , true , false ) ) . setValidateNull ( false ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final SimpleAttributeDefinition ADVANCED_FILTER = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelDescriptionConstants . ADVANCED_FILTER , ModelType . STRING , false ) . setXmlName ( "filter" ) . setAlternatives ( USERNAME_ATTRIBUTE ) . setValidator ( new StringLengthValidator ( 1 , Integer . MAX_VALUE , true , false ) ) . setValidateNull ( false ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; public static final AttributeDefinition [ ] ATTRIBUTE_DEFINITIONS = new AttributeDefinition [ ] { LdapAuthenticationResourceDefinition . CONNECTION , LdapAuthenticationResourceDefinition . BASE_DN , LdapAuthenticationResourceDefinition . RECURSIVE , LdapAuthenticationResourceDefinition . USER_DN , LdapAuthenticationResourceDefinition . USERNAME_FILTER , LdapAuthenticationResourceDefinition . ADVANCED_FILTER } ; public LdapAuthenticationResourceDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } private static class LdapAuthenticationWriteHandler extends SecurityRealmChildWriteAttributeHandler { private LdapAuthenticationWriteHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode ignored ) throws OperationFailedException { final Resource resource = context . readResource ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; LdapAuthenticationResourceDefinition . validateAttributeCombination ( model ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } } , MODEL ) ; super . execute ( context , operation ) ; } } private static class LdapAuthenticationAddHandler extends SecurityRealmChildAddHandler { private LdapAuthenticationAddHandler ( ) { } @ Override protected void updateModel ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } private static void validateAttributeCombination ( ModelNode operation ) throws OperationFailedException { } }

Fix:
context . stepCompleted ( ) ;