PDA

View Full Version : Possible bug: Bean name and parent name are the same



robmoore
Apr 15th, 2005, 01:16 PM
I'm seeing an odd error with the latest Spring IDE (1.1.0, I believe). I have a bean definition with some nested 'anonymous' bean definitions. When I do so, I get the error message "Bean name and parent name are the same". I tried giving all of them names, but the error remains. Here's a facsimile snippet of my bean definition:



<bean id="DailyRollupDef"
class="com.example.ReportDefinition">
<property name="exportParameters">
<map>
<entry key="ReportTitle">
<value>My Report</value>
</entry>
</map>
</property>
<property name="inputParameters">
<bean class="com.example.ReportInputParameters">
<property name="reportName">
<value>DailyRollup</value>
</property>
<property name="setupProviderName">
<value>ReportSetup</value>
</property>
<property name="recordTypes">
<list>
<bean
class="com.example.DayStatsRecordType">
<constructor-arg>
<value>DAY</value>
</constructor-arg>
</bean>
</list>
</property>
</bean>
</property>
...
</bean>


Another issue I've seen -- not a show-stopper -- is the bean definitions have to be forward declared. That is, I have to have parent beans declared before their children. This doens't bother Spring and I assumed it was legal...

Thanks,

Rob[/code]

Torsten Juergeleit
Apr 15th, 2005, 04:00 PM
Rob,

thank you for spotting this. I've created the corresponding tickets:
http://springide.org/project/ticket/27
http://springide.org/project/ticket/28

Cheers,
Torsten