-
Feb 8th, 2012, 12:13 PM
#1
Help with DomainClassConverter configuration
Hi. Hoping someone can help me with this error. The documentation says I can set up a Domain Converter using the following XML, but it causes an error because the outer bean is in construction when the inner bean is created:
<mvc:annotation-driven conversion-service="conversionService" />
<bean id="conversionService" class="org.springframework.context.support.Convers ionServiceFactoryBean">
<property name="converters">
<list>
<bean class="org.springframework.data.repository.support .DomainClassConverter">
<constructor-arg ref="conversionService" />
</bean>
</list>
</property>
</bean>
The error is:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'conversionService' defined in class path resource [META-INF/spring/rest-servlet.xml]: Cannot create inner bean 'org.springframework.data.repository.support.Domai nClassConverter#535af9ae' of type [org.springframework.data.repository.support.Domain ClassConverter] while setting bean property 'converters' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.data.repository.support.Domai nClassConverter#535af9ae' defined in class path resource [META-INF/spring/rest-servlet.xml]: Cannot resolve reference to bean 'conversionService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCurrentlyInC reationException: Error creating bean with name 'conversionService': FactoryBean which is currently in creation returned null from getObject
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules