spring security roles
i have user roles tables in my database, which contains roles like 'ROLE_ADMIN' and 'ROLE_USER', and in applicationContext-security.xml, i defined the filterSecurityInterceptor as:


    <bean id="filterSecurityInterceptor" class="org.springframework.security.intercept.web. FilterSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager" />
    <property name="accessDecisionManager" ref="accessDecisionManager" />
    <property name="objectDefinitionSource">
    <s:filter-invocation-definition-source>
    <s:intercept-url pattern="/rpc/userService" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    <s:intercept-url pattern="/rpc/adminService**" access="ROLE_ADMIN"/>
    <s:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </s:filter-invocation-definition-source>
    </property>
    </bean>

however when i tried to access some resource as admin user, it got rejected, complained as:

    An Authentication object was not found in the SecurityContext

 how can i convert a role that defined in the database to a role that recognized by securityContext?

spring security roles
===

i have user roles tables in my database, which contains roles like 'ROLE_ADMIN' and 'ROLE_USER', and in applicationContext-security.xml, i defined the filterSecurityInterceptor as:


    <bean id="filterSecurityInterceptor" class="org.springframework.security.intercept.web. FilterSecurityInterceptor">
    <property name="authenticationManager" ref="authenticationManager" />
    <property name="accessDecisionManager" ref="accessDecisionManager" />
    <property name="objectDefinitionSource">
    <s:filter-invocation-definition-source>
    <s:intercept-url pattern="/rpc/userService" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    <s:intercept-url pattern="/rpc/adminService**" access="ROLE_ADMIN"/>
    <s:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </s:filter-invocation-definition-source>
    </property>
    </bean>

however when i tried to access some resource as admin user, it got rejected, complained as:

    An Authentication object was not found in the SecurityContext

 how can i convert a role that defined in the database to a role that recognized by securityContext?
