Announcement Announcement Module
Collapse
No announcement yet.
upgraded SI 1.0.0 to 1.0.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • upgraded SI 1.0.0 to 1.0.1

    when I upgraded SI 1.0.0 to 1.0.1, it throws exception as follows:
    Code:
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' defined in null: Cannot register bean definition [Generic bean: class [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] for bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor': There is already [Generic bean: class [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] bound.
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.registerBeanDefinition(DefaultListableBeanFactory.java:461)
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerBeanDefinition(BeanDefinitionReaderUtils.java:174)
    	at org.springframework.integration.config.xml.IntegrationNamespaceHandler.registerDefaultConfiguringBeanFactoryPostProcessor(IntegrationNamespaceHandler.java:68)
    	at org.springframework.integration.config.xml.IntegrationNamespaceHandler.parse(IntegrationNamespaceHandler.java:51)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    ......
    I inspected the source code of SI and find the reason was the changes in IntegrationNamespaceHandler.java. The DefaultConfiguringBeanFactoryPostProcessor should be registered only once, but if the allowBeanDefinitionOverriding field of DefaultListableBeanFactory was setted as false, in some condition, this exception occurs. For example, in my project, I set allowBeanDefinitionOverriding as false and have several classes implement the BeanFactoryPostProcessor interface, which then load SI xml configuration files respectively in postProcessBeanFactory method, then the exception occurs. In this condition, the DefaultConfiguringBeanFactoryPostProcessor was registered several times. While in SI 1.0.0, all runs well.

  • #2
    Looks like a bug to me, please create a JIRA issue for this.

    Comment


    • #3
      Please do report this in JIRA. Can you also provide just a high-level description of the configuration? I assume you have a hierarchy of ApplicationContexts.

      Comment


      • #4
        I went ahead and created this issue:
        http://jira.springframework.org/browse/INT-532

        Comment


        • #5
          I committed a simple change that should resolve this. See the commit log here for the details: https://fisheye.springframework.org/...ation/?cs=1885

          I am keeping the issue open for 1.0.2 while considering some other options for this post-processor registration altogether.

          This is actually the very first modification after the 1.0.1.RELEASE, so if you can possibly grab the JAR from this revision (or the next build), then you will have the exact same JAR for 1.0.1 plus this fix and nothing else.

          Thanks for pointing it out.
          -Mark

          Comment


          • #6
            The first build with this change is CI-1414:
            https://build.springframework.org/browse/INT-TRUNK-1414

            The SVN revision is #1885.

            Comment


            • #7
              The revision takes effect. SI runs well now.

              Comment

              Working...
              X