Results 1 to 3 of 3

Thread: IllegalArgumentException on Tomcat startup

  1. #1
    Join Date
    Feb 2005
    Posts
    14

    Default IllegalArgumentException on Tomcat startup

    Hello,

    When adding an acl voter to my decisionVoters in the accessDecisionManager, I always get a

    Code:
    java.lang.IllegalArgumentException: AccessDecisionManager does not support secure object class: class net.sf.acegisecurity.intercept.web.FilterInvocation
    	at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.afterPropertiesSet(AbstractSecurityInterceptor.java:246)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1003)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:348)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    In my applicationContext-security.xml file I have:

    Code:
    <bean id="securityEnforcementFilter" class="net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter">
            <property name="filterSecurityInterceptor"><ref local="filterInvocationInterceptor"/></property>
            <property name="authenticationEntryPoint"><ref local="authenticationProcessingFilterEntryPoint"/></property>
        </bean>
        
        <bean id="filterInvocationInterceptor" class="net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor">
            <property name="authenticationManager"><ref local="authenticationManager"/></property>
            <property name="accessDecisionManager"><ref local="businessAccessDecisionManager"/></property>
            <property name="objectDefinitionSource">
                <value>
                    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
                    PATTERN_TYPE_APACHE_ANT
                    /signup.html=admin,user
                    /passwordhint.html*=admin,user
                    /**/*.html*=admin,user
                    /**/*.htm*=admin,user
                    /clickstreams.jsp=admin
                </value>
            </property>
        </bean>
        <bean id="businessAccessDecisionManager" class="net.sf.acegisecurity.vote.AffirmativeBased">
          <property name="allowIfAllAbstainDecisions"><value>false</value></property>
          <property name="decisionVoters">
             <list>
                <ref local="roleVoter"/>
                <ref local="aclMyObjectWriteVoter"/>          
             </list>
          </property>  
       </bean>
    As a recent adopter of Acegi, this is probably a configuration issue. Any ideas? I am currently using version 0.8.3.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2005
    Posts
    14

    Default resolved

    There was a reference in my filterInvocationInterceptor to an accessDecisionManager with an aclVoter. When using both the filterInvocationInterceptor and the methodInvocationInterceptor, you have to define 2 different accessDecisionManagers, one with acl voters (called by the methodInvocationIterceptor) and one without (called by the filterInvocationInterceptor).

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    This is correct. BasicAclEntryVoter will only support MethodInvocation security - not FilterInvocation security. As such, at startup time the FilterSecurityInterceptor (which uses FilterInvocation) queried the corresponding AccessDecisionManager and found a non-supporting AccessDecisionVoter.

    I thought I'd expand on what was happening to help other users who encounter this.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Similar Threads

  1. Spring + Quartz + Tomcat = no shutdown
    By ahumphr in forum Container
    Replies: 7
    Last Post: Jul 5th, 2011, 11:45 AM
  2. Replies: 4
    Last Post: Jun 15th, 2005, 04:47 PM
  3. Tomcat [ERROR] SchemaExecute update
    By scraly in forum Web
    Replies: 0
    Last Post: Apr 26th, 2005, 02:59 AM
  4. Replies: 1
    Last Post: Mar 9th, 2005, 04:51 PM
  5. Problem with Tomcat "-security" switch
    By lotus118 in forum Data
    Replies: 0
    Last Post: Dec 4th, 2004, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •