Results 1 to 7 of 7

Thread: upgraded SI 1.0.0 to 1.0.1

  1. #1
    Join Date
    Oct 2008
    Posts
    18

    Default 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. #2
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

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

  3. #3
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    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.

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

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

  5. #5
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    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

  6. #6
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

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

    The SVN revision is #1885.

  7. #7
    Join Date
    Oct 2008
    Posts
    18

    Default

    The revision takes effect. SI runs well now.

Posting Permissions

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