Announcement Announcement Module
Collapse
No announcement yet.
Spring OAuth2 1.0.0.M3 depends on Spring 2.0.x in OAuth2ProviderBeanDefinitionParser. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring OAuth2 1.0.0.M3 depends on Spring 2.0.x in OAuth2ProviderBeanDefinitionParser.

    Hi,

    I'm using Spring Security 3.0.5, OAuth for Spring 1.0.0.M3 and Spring Security 3.0.5.
    With this filterChainProxy configuration -

    Code:
     
    <bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy">
    		<sec:filter-chain-map path-type="ant">
    			<sec:filter-chain pattern="/**" filters="
    				securityContextPersistenceFilterWithASCFalse,
    				anonymousAuthFilter,
    				exceptionTranslationFilter,
    				OAuth2ExceptionHandlerFilter, 
    				OAuth2AuthorizationFilter, 
    				OAuth2ProtectedResourceFilter,
    				filterSecurityInterceptor" />
    		</sec:filter-chain-map>
    	</bean>
    the following exception was raised while starting up Tomcat-

    Code:
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.security.filterChainProxy' is defined
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)
    	at org.springframework.security.oauth2.config.OAuth2ProviderBeanDefinitionParser.parse(OAuth2ProviderBeanDefinitionParser.java:57)
    	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
    Looking at the source, OAuth2ProviderBeanDefinitionParser in Spring OAuth 1.0.0.M3, makes a reference to org.springframework.security.config.BeanIds.FILTER _CHAIN_PROXY which is defined as -
    Code:
     public static final java.lang.String FILTER_CHAIN_PROXY = "org.springframework.security.filterChainProxy";
    org.springframework.security.filterChainProxy is the package structure in Spring Security 2.0.

    In Spring Security 3.0, FilterChainProxy is packaged as -
    Code:
    org.springframework.security.web.FilterChainProxy
    Is the configuration I have used incorrect?

  • #2
    The issue isn't a dependency problem. Even though the package changed for the class in spring security 3, the bean id stayed the same.

    It looks like you're trying to use the namespace configuration for oauth for spring security without using the namespace configuration for spring security. Is that correct? If so, you're kinda on your own since the namespace configuration for ssoauth was designed to be used with the namespace configuration for ss.

    Comment

    Working...
    X