Issue Details (XML | Word | Printable)

Key: TRAILS-111
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Kalle Korhonen
Reporter: Vijai Furtado
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Trails

SpringSeedEntityInitializer does not handle abstract beans...

Created: 21/Oct/07 07:04 PM   Updated: 07/Apr/08 11:34 AM
Component/s: trails-hibernate
Affects Version/s: 1.1.1
Fix Version/s: 1.2.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File SpringSeedEntityInitializer.java (6 kB)

Environment: All

Patch Submitted: Yes


 Description  « Hide
The SpringSeedEntityInitializer, exits with an exception when abstract beans are defined in a context.
like below

<bean id="baseController" class="org.openiam.idm.web.OpenIamAbstractController" abstract="true">
<property name="app">
<ref bean="appExplorer" />
</property>
</bean>

<bean id="objectInfoController" parent="baseController"
class="org.openiam.idm.web.ObjectInfoController" />

<bean id="objectValueController" parent="baseController"
class="org.openiam.idm.web.ObjectValueController" />

<bean id="objectListController" parent="baseController"
class="org.openiam.idm.web.ObjectListController" />

<bean id="queryListController" parent="baseController"
class="org.openiam.idm.web.QueryListController" />

org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'baseController': Bean definition is abstract
at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:1035)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:244)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:733)
at org.openiam.idm.trails.seeddata.SpringSeedEntityInitializer.init(SpringSeedEntityInitializer.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)

I have attached a patch that, I am currently using. Hope this helps to fix the bug...



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Kalle Korhonen added a comment - 21/Oct/07 08:35 PM
Thanks Vijai. Just a note that what you've attached is the whole source for the modified class, not a diff/patch. I'll take care of this, tentatively plan for 1.2 but let me know if anybody else runs into this and would like it fixed sooner (in 1.1.2)

Kalle Korhonen added a comment - 24/Jan/08 02:55 AM
Fixed as suggested