org.springframework.beans.factory.parsing.BeanDefinitionParsingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Hello, I have following bean definition in the context XML <bean id="routeEditor" class="de.ntec.freecall.ui.monitor.editor.RouteEditor" scope="prototype"> <constructor-arg index="0" ref="maintenanceDao" /> <constructor-arg index="1" value="true" /> <property name="activeTopologyConnectorColor"> <util:constant static-field="java.awt.Color.RED"/> </property> <property name="activeTopologyConnectorColor" value="${routeEditor.activeTopologyConnectorColor}"/> <property name="defaultTopologyPointColor" value="${routeEditor.defaultTopologyPointColor}"/> <property name="highlightedTopologyPointColor" value="${routeEditor.highlightedTopologyPointColor}"/> <property name="topologyConnectorColor" value="${routeEditor.topologyConnectorColor}"/> <property name="topologyTextColor" value="${routeEditor.topologyTextColor}"/> <property name="normalStroke" value="${routeEditor.normalStroke}"/> <property name="pointStroke" value="${routeEditor.pointStroke}"/> <property name="thickStroke" value="${routeEditor.thickStroke}"/> </bean> Spring IDE 2.0.4 shows no errors in it but context creation failed with exception aused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Multiple 'property' definitions for property 'activeTopologyConnectorColor' Offending resource: class path resource [contextFreeCall.xml] Bean 'routeEditor' -> Property 'activeTopologyConnectorColor' at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:261) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElement(BeanDefinitionParserDelegate.java:692) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElements(BeanDefinitionParserDelegate.java:584) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:494) ... 37 more so vlidity checking need to be improved in the IDE. Regards, Oleksandr
    via by Oleksandr Alesinskyy,
  • Hello, I have following bean definition in the context XML <bean id="routeEditor" class="de.ntec.freecall.ui.monitor.editor.RouteEditor" scope="prototype"> <constructor-arg index="0" ref="maintenanceDao" /> <constructor-arg index="1" value="true" /> <property name="activeTopologyConnectorColor"> <util:constant static-field="java.awt.Color.RED"/> </property> <property name="activeTopologyConnectorColor" value="${routeEditor.activeTopologyConnectorColor}"/> <property name="defaultTopologyPointColor" value="${routeEditor.defaultTopologyPointColor}"/> <property name="highlightedTopologyPointColor" value="${routeEditor.highlightedTopologyPointColor}"/> <property name="topologyConnectorColor" value="${routeEditor.topologyConnectorColor}"/> <property name="topologyTextColor" value="${routeEditor.topologyTextColor}"/> <property name="normalStroke" value="${routeEditor.normalStroke}"/> <property name="pointStroke" value="${routeEditor.pointStroke}"/> <property name="thickStroke" value="${routeEditor.thickStroke}"/> </bean> Spring IDE 2.0.4 shows no errors in it but context creation failed with exception aused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Multiple 'property' definitions for property 'activeTopologyConnectorColor' Offending resource: class path resource [contextFreeCall.xml] Bean 'routeEditor' -> Property 'activeTopologyConnectorColor' at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:261) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElement(BeanDefinitionParserDelegate.java:692) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElements(BeanDefinitionParserDelegate.java:584) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:494) ... 37 more so vlidity checking need to be improved in the IDE. Regards, Oleksandr
    via by Oleksandr Alesinskyy,
  • If you define a bean with the same 'id' and 'name' attributes in the xml config, an exception will be thrown upon parsing the bean definition file. eg. <bean id="foo" name="foo" class="a.b.C"> </bean> causes: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean name 'foo' is already used in this file. at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:59) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:64) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:55) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.checkNameUniqueness(BeanDefinitionParserDelegate.java:452) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:418) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:390) etc The problem seems to be caused by org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.checkNameUniqueness(String, List, Element). The bean name is added to the list of used names, then the aliases are checked. Because the aliases contain the same bean name, it causes the exception. This behaviour does not occur in version 1.2.8. This may not technically be a bug (I guess id and name should not be the same), but it does cause a problem with backwards compatability.
    via by Scott Russell,
    • org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Multiple 'property' definitions for property 'activeTopologyConnectorColor' Offending resource: class path resource [contextFreeCall.xml] Bean 'routeEditor' -> Property 'activeTopologyConnectorColor' at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:261) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElement(BeanDefinitionParserDelegate.java:692) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertyElements(BeanDefinitionParserDelegate.java:584) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:494)

    Users with the same issue

    Victor_ITVictor_IT
    1 times, last one,
    Unknown UserUnknown User
    1 times, last one,
    tomthomastomthomas
    1 times, last one,
    aldrinlealaldrinleal
    1 times, last one,
    DunmerDunmer
    2 times, last one,
    32 more bugmates