Results 1 to 3 of 3

Thread: Which Spring security version to sue with blazeds integration?

  1. #1
    Join Date
    Jan 2008
    Posts
    12

    Default Which Spring security version to sue with blazeds integration?

    Hi,
    What version of Spring security is supported by Spring Blaze DS integration?

    I`m currently trying to use spring blazeds integration 1.0.3 and spring security 3.0.2 but I`m getting the exception below. Spring can`t find the org.springframework.security.authenticationManager . I believe in Spring security 3.0.2 the package structure has changed to be
    org.springframework.security.core.authenticationMa nager.

    Is it something wrong with my configuration or am I using the wrong version of Spring security?

    My Spring security and flex contexts are attached as well as my ivy.xml

    Any help would be most appreciated

    regards

    Darran

    06:38:47.847 [main] ERROR o.s.w.servlet.DispatcherServlet - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '_messageBroker': Cannot resolve reference to bean '_messageBrokerLoginCommand' while setting bean property 'configProcessors' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '_messageBrokerLoginCommand': Cannot resolve reference to bean 'org.springframework.security.authenticationManage r' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'org.springframework.security.authenticationManage r' is defined
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    SBI 1.0.3 supports both Spring Security 2.x and 3.x. The version you are using will be detected at runtime (make sure you've only got one or the other on your classpath) and the appropriate support classes chosen based on that detection.

    That said, looking at your config, the problem looks to be that you are assigning an explicit id to the AuthenticationManager, but not referencing that in your Flex config. Given that you are assigning an id of "authenticationManager", your Flex config should be:

    Code:
    <flex:message-broker>
        <flex:secured authentication-manager="authenticationManager"/>
    </flex:message-broker>
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Apr 2010
    Posts
    1

    Default Wrong dependency when getting org.springframework.flex dependencies using ivy

    Hi,
    Thanks for your reply. I was messing around with the configuration to try and get it to work which is why I specified the alias.

    However in the end I realised I was pulling in the com.springframework.security.2.0.4.A jars even though I wasn`t specifying them in my ivy.xml file.
    It appears the org.springframework.flex ivy.xml on the SpringSource Enterprise bundle repo is wrong as I was using

    Code:
    <dependency org="org.springframework.flex" name="org.springframework.flex" rev="1.0.3.RELEASE"/>
    to get the spring integration BlazeDS jars from the Spring repo and this was pulling in the spring security 2.0.4.A dependency.

    I`ve added the following to include only the 3.0.2 spring security and exclude the 2.0.4.A jar

    Code:
     <dependency org="org.springframework.security" name="org.springframework.security.core" rev="3.0.2.RELEASE" />
            <dependency org="org.springframework.security" name="org.springframework.security.web" rev="3.0.2.RELEASE" />
            <dependency org="org.springframework.security" name="org.springframework.security.config" rev="3.0.2.RELEASE" />
          <exclude org="org.springframework.security" module="org.springframework.security" />
    so this is no longer a issue and I get no exceptions when starting tomcat.
    But I guess the ivy.xml on spring repo needs to be fixed to not pull in the 2.0.4.A dependency

    Darran

Tags for this Thread

Posting Permissions

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