Q: Calling j_spring_security_check directly from JSF application fails I have a JSF+Spring app. It's running with spring security 2.0.2. When I try to invoke myapp/j_spring_security_check, I get my app's error page with no exception explaining what happened. The log on the console comes up empty as well.
Here's my spring security config:
<?xml version="1.0" encoding="UTF-8"?>

<beans:beans
        xmlns="http://www.springframework.org/schema/security"
        xmlns:beans="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                          http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                          http://www.springframework.org/schema/security
                          http://www.springframework.org/schema/security/spring-security-2.0.1.xsd">

    <http
            auto-config="true">

        <intercept-url pattern="/view/iam/login.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/iam/userSelfRegistration.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/images/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/iam/js/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/css/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/password.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/registration.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/register.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <!--intercept-url pattern="/rest/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/-->
        <intercept-url pattern="/view/registrationProduct.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/studentRegistration.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/view/iam/concurrentTest.do" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/a4j/**" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
        <intercept-url pattern="/" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <!-- root redirects to deal-mgmt -->
        <intercept-url pattern="/**" access="ROLE_HOME_VIEW"/>


        <form-login
                login-processing-url="/j_spring_security_check"
                login-page="/view/iam/login.do"
                default-target-url="/view/iam/deal-mgmt.do"
                always-use-default-target="false"
                authentication-failure-url="/view/iam/login.do?login_error=1"/>

    </http>

    <beans:bean id="iapUserDetailsService" class="mycompany.mypackage.services.auth.IapUserDetailsService">
        <beans:property name="userDao" ref="userDaoServ"/>
        <beans:property name="userPrivilegeDao" ref="userPrivilegeDaoServ"/>
        <beans:property name="rolePrivilegeDao" ref="rolePrivilegeDaoServ"/>
        <beans:property name="userWebseviceClient" ref="iapUserWsClientServ"/>
    </beans:bean>

    <beans:bean id="iapPasswordEncoder" class="mycompany.mypackage.services.auth.IapPasswordEncoder"/>
    <authentication-provider user-service-ref="iapUserDetailsService">
        <password-encoder ref="iapPasswordEncoder"/>
    </authentication-provider>
</beans:beans>

I debugged the authentication and everything seems to be working fine. The problems comes when trying to render the target url. However, if after the auth goes through, I try to hit the app's url, it redirects to the right place (the target url) but the error page is displayed. It seems like it's getting stuck somewhere.
Let me know if you need more info (and what kind) and I'll add it. Thanks!

A: I finally got it to work. I set all the loggers to ALL so I could see what was going on and find out the exception I was getting was from spring security saying my user didn't have the roles required. I fixed that and it's working now.  Thanks CodeChimp!
