Security Domain not working after moving to wildfly from jboss AS 7.1.1

Version 1

    Hi

     

    I migrated to wildfly and everything seemed to work except when I try to access pages that are under a secure domain, I dont get any errors or any logs,

     

    <subsystem xmlns="urn:jboss:domain:security:1.2">
                <security-domains>
                    <security-domain name="other" cache-type="default">
                        <authentication>
                            <login-module code="Remoting" flag="optional">
                                <module-option name="password-stacking" value="useFirstPass"/>
                            </login-module>
                            <login-module code="RealmDirect" flag="required">
                                <module-option name="password-stacking" value="useFirstPass"/>
                            </login-module>
                        </authentication>
                    </security-domain>
                    <security-domain name="jboss-web-policy" cache-type="default">
                        <authorization>
                            <policy-module code="Delegating" flag="required"/>
                        </authorization>
                    </security-domain>
                    <security-domain name="jboss-ejb-policy" cache-type="default">
                        <authorization>
                            <policy-module code="Delegating" flag="required"/>
                        </authorization>
                    </security-domain>
                    <security-domain name="mapacheSecurity">
                        <authentication>
                            <login-module code="Database" flag="required">
                                <module-option name="dsJndiName" value="java:jboss/mapacheDS"/>
                                <module-option name="principalsQuery" value="select password from usuario where lower(usuario)=lower(?) and activo = 'true'"/>
                                <module-option name="rolesQuery" value="select 1, 'Roles' from usuario where ? is not null"/>
                                <module-option name="hashAlgorithm" value="SHA-256"/>
                                <module-option name="hashEncoding" value="base64"/>
                            </login-module>
                        </authentication>
                    </security-domain>
                </security-domains>
            </subsystem>
    

     

     

    mapacheSecurity is the security domain.  The problem is that when I use the same .war file on my jboss 7.1.1 I am able to log in with my user and password, but when I try to log in on wildfly I just get redirected to my login.jsp page with an error of invalid user or password in my page, but I dont see anything on the logs.

     

    It is the same app, using the exact same database.  Is there a change in the encoding?

     

    When ever I use and incorrect user or password on jboss 7.1.1 I get this on the logs

     

    15:44:43,070 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--0.0.0.0-8080-1) Login failure: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
            at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) [picketbox-4.0.7.Final.jar:4.0.7.Final]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_55]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_55]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_55]
            at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_55]
            at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762) [rt.jar:1.7.0_55]
            at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_55]
            at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690) [rt.jar:1.7.0_55]
            at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688) [rt.jar:1.7.0_55]
            at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_55]
    

     

    On wildfly I dont get any messages it is like it is not even going to the server.