Spring Security
  1. Spring Security
  2. SEC-1453

Websphere V 7.0.0.7 Issue with Spring Security 3.0.2 & Spring BlazeDS Integration 1.0.3 (Still looking for Spring Security 2.x Authentication Manager)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3
    • Component/s: Web
    • Labels:
      None
    • Environment:
      Windows 2008, Websphere V 7.0.0.7, Spring 3.0.0 Release, Spring Security 3.0.2, Spring Flex Integration 1.0.3, Apache Active MQ 5.2, BlazeDS 3.2.0.3978

      Description

      I am working in a project working with a group of frameworks:
      1- Spring 3.0.0 Release
      2- Spring Security 3.0.2 Release
      3- Spring BlazeDS Integration 1.0.3
      4- Apache Active MQ 5.2

      I am deployed the system in
      1- Spring TC Server V 6.0 (Working Fine)
      2- Websphere V 7.0.0.7 (Facing Exceptions)

      I faced the first exception was:

      SRVE0100E: Uncaught init() exception created by servlet dispatcher-flex in application NJM_war: 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 '_authenticationManager' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named '_authenticationManager' is defined at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:450) at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 90) at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222) at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:287 ) at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189) at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:557) at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:842) at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:416) at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:261) at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:192) at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServle tContextCreated(WebApp.java:1667) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitia lizationFinish(WebApp.java:368) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initiali ze(WebAppImpl.java:294)

      I solved this issue by adding an alias to the <authentication-manager alias="-authenticationManager">

      I faced after it an exception

      SRVE0100E: Uncaught init() exception created by servlet dispatcher in application NJM_war: 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.UnsatisfiedDepen dencyException: Error creating bean with name '_messageBrokerLoginCommand': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.security.AuthenticationManager]: Could not convert constructor argument value of type [org.springframework.security.authentication.Provid erManager] to required type [org.springframework.security.AuthenticationManager]: Failed to convert value of type 'org.springframework.security.authentication.Provi derManager' to required type 'org.springframework.security.AuthenticationManage r'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.authentication.Provid erManager] to required type [org.springframework.security.AuthenticationManager]: no matching editors or conversion strategy found at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:450) at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 90) at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222) at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:287 ) at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189) at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:557) at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:842) at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:416) at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:261) at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:192) at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServle tContextCreated(WebApp.java:1667) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitia lizationFinish(WebApp.java:368) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initiali ze(WebAppImpl.java:294) at

      If you traced the exception you will found that it is waiting for AuthenticationManager instance and recieved ProviderManager instance. The ProviderManager is implements the AuthenticationManager bu the problem it is looking for AuthenticationManager from spring security 2.x since it's package is org.springframework.security.AuthenticationManager while in spring security 3.x is org.springframework.security.authentication.AuthenticationManager

      I attached my security context file & jms context file.

      1. applicationContext-jms.xml.txt
        2 kB
        Mohamed Elsayed Sahmoud
      2. applicationContext-security.xml.txt
        2 kB
        Mohamed Elsayed Sahmoud

        Activity

        Hide
        Mohamed Elsayed Sahmoud added a comment -

        I found the issue.

        It is a deployment problem since I was before deploying the system with 1- Spring Integration 1.0.1 2- Spring Security 2.0.5. The websphere wasn't removing the old JARs which caused calling spring security 2 classes which caused the exception.

        I removed the old JARs & everything is working fine now.

        Sorry for opening a wrong Bug.

        Show
        Mohamed Elsayed Sahmoud added a comment - I found the issue. It is a deployment problem since I was before deploying the system with 1- Spring Integration 1.0.1 2- Spring Security 2.0.5. The websphere wasn't removing the old JARs which caused calling spring security 2 classes which caused the exception. I removed the old JARs & everything is working fine now. Sorry for opening a wrong Bug.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Mohamed Elsayed Sahmoud
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: