Configuração Spring 2.0 - Failed to convert property value o

Boa tarde a todos.

Desculpem se já existir um tópico sobre o mesmo problema, mas, por não saber o que o causa, creio que não estou nem sabendo pesquisar a solução (visto que nem no google consigo achar :lol: falta direção mesmo…)

Bom, mas, vamos lá: Estou brincando numa aplicação aqui, com Spring 2.0, e Hibernate, server Jboss 4.0.5, uso Eclipse 3.2. Para me enturmar bem com o Spring, estou seguindo alguns tutoriais, e por enquanto fazendo toda a configuração via XML (depois q aprender, passo para anotações, hehehe).

Como um arquivo XML para todas as configurações fica extremamente complicado de mexer, separei em:

action-servlet: o principal, que declara os controladores, e faz as outras configurações básicas;
applicationContext-service.xml: declaração dos services
applicationContext-jdbc.xml: configurações do banco;
applicationContext-dao.xml: configurações do hibernate e meus daos

Meu arquivo applicationContext-dao.xml está da seguinte forma:

[code]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

&lt;bean id=&quot;sessionFactory&quot; class=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&gt;

	&lt;property name=&quot;dataSource&quot;&gt;
		&lt;ref bean=&quot;dataSource&quot;/&gt;
	&lt;/property&gt;

	&lt;property name=&quot;configLocation&quot;&gt;
		&lt;value&gt;WEB-INF/hibernate.cfg.xml&lt;/value&gt;
	&lt;/property&gt;

	&lt;property name=&quot;configurationClass&quot;&gt;
		&lt;value&gt;org.hibernate.cfg.AnnotationConfiguration&lt;/value&gt;
	&lt;/property&gt;

	&lt;property name=&quot;hibernateProperties&quot;&gt;
		&lt;props&gt;
			&lt;prop key=&quot;hibernate.dialect&quot;&gt;org.hibernate.dialect.MySQLInnoDBDialect&lt;/prop&gt;
			&lt;prop key=&quot;hibernate.hbm2ddl.auto&quot;&gt;update&lt;/prop&gt;
		&lt;/props&gt;
	&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&gt;
	&lt;property name=&quot;sessionFactory&quot;&gt;
	&lt;ref bean=&quot;sessionFactory&quot;/&gt;
	&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id=&quot;txAttributeSource&quot; class=&quot;org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource&quot;&gt;

&lt;property name=&quot;properties&quot;&gt;
	&lt;props&gt;
		&lt;prop key=&quot;add*&quot;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
		&lt;prop key=&quot;update*&quot;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
		&lt;prop key=&quot;remove*&quot;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
		&lt;prop key=&quot;send*&quot;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
	&lt;/props&gt;
&lt;/property&gt;

</bean>

&lt;bean id=&quot;txInterceptor&quot; class=&quot;org.springframework.transaction.interceptor.TransactionInterceptor&quot;&gt;
	&lt;property name=&quot;transactionManager&quot;&gt;
		&lt;ref local=&quot;transactionManager&quot;/&gt;
	&lt;/property&gt;

	&lt;property name=&quot;transactionAttributeSource&quot;&gt;
		&lt;ref local=&quot;txAttributeSource&quot;/&gt;
	&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id=&quot;autoProxyCreator&quot; class=&quot;org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator&quot;&gt;
	&lt;property name=&quot;interceptorNames&quot;&gt;
		&lt;list&gt;
			&lt;idref local=&quot;txInterceptor&quot;/&gt;
		&lt;/list&gt;
	&lt;/property&gt;
	&lt;property name=&quot;beanNames&quot;&gt;
		&lt;list&gt;
			&lt;value&gt;*Dao&lt;/value&gt;
			&lt;value&gt;*DAO&lt;/value&gt;
		&lt;/list&gt;
	&lt;/property&gt;
&lt;/bean&gt;

&lt;bean id=&quot;usuarioDAO&quot; class=&quot;br.com.test.dao.UsuarioDAO&quot;&gt;
	&lt;property name=&quot;sessionFactory&quot;&gt;
		&lt;ref bean=&quot;sessionFactory&quot;/&gt;
	&lt;/property&gt;
&lt;/bean&gt;

</beans>[/code]

E, no applicationContext-service.xml faço a referência pra o bean do meu DAO:

... &lt;bean id=&quot;usuarioService&quot; parent=&quot;txProxyTemplate&quot;&gt; &lt;property name=&quot;target&quot;&gt; &lt;bean class=&quot;br.com.test.services.UsuarioService&quot;&gt; &lt;property name=&quot;usuarioDAO&quot;&gt; &lt;ref bean=&quot;usuarioDAO&quot;/&gt; &lt;/property&gt; &lt;/bean&gt; &lt;/property&gt; &lt;/bean&gt;...

Mas, no console tenho o seguinte erro:

15&#58;29&#58;57,015 INFO  &#91;SessionFactoryImpl&#93; closing
15&#58;29&#58;57,015 ERROR &#91;ContextLoader&#93; Context initialization failed
org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'usuarioService' defined in ServletContext resource &#91;/WEB-INF/applicationContext-service.xml&#93;&#58; Cannot create inner bean 'br.com.test.services.UsuarioService#15998cb' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'br.com.test.services.UsuarioService#15998cb' defined in ServletContext resource &#91;/WEB-INF/applicationContext-service.xml&#93;&#58; Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions &#40;1&#41; are&#58;
PropertyAccessException 1&#58; org.springframework.beans.TypeMismatchException&#58; Failed to convert property value of type &#91;$Proxy64&#93; to required type &#91;br.com.test.dao.UsuarioDAO&#93; for property 'usuarioDAO'; nested exception is java.lang.IllegalArgumentException&#58; No matching editors or conversion strategy found
Caused by&#58; 
org.springframework.beans.factory.BeanCreationException&#58; Error creating bean with name 'br.com.test.services.UsuarioService#15998cb' defined in ServletContext resource &#91;/WEB-INF/applicationContext-service.xml&#93;&#58; Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions &#40;1&#41; are&#58;
PropertyAccessException 1&#58; org.springframework.beans.TypeMismatchException&#58; Failed to convert property value of type &#91;$Proxy64&#93; to required type &#91;br.com.test.dao.UsuarioDAO&#93; for property 'usuarioDAO'; nested exception is java.lang.IllegalArgumentException&#58; No matching editors or conversion strategy found
Caused by&#58; 
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details &#40;1&#41; are&#58;
PropertyAccessException 1&#58;
org.springframework.beans.TypeMismatchException&#58; Failed to convert property value of type &#91;$Proxy64&#93; to required type &#91;br.com.test.dao.UsuarioDAO&#93; for property 'usuarioDAO'; nested exception is java.lang.IllegalArgumentException&#58; No matching editors or conversion strategy found
Caused by&#58; 
java.lang.IllegalArgumentException&#58; No matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary&#40;TypeConverterDelegate.java&#58;212&#41;
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary&#40;TypeConverterDelegate.java&#58;127&#41;
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;775&#41;

E, não sei o que significa esse erro… não sei qual configuração está exatamente causando-o. Se eu mudar o id do bean para qualquer coisa, “testeDeBEan”, por exemplo, tanto no xml do DAO quanto do service, a inicialização funciona corretamente. Mas, se volto para usuarioDAO, pára de funcionar. Por que isso ocorre? Não pode ter o mesmo nome da classe? Assim, no service, tenho a variável:

[code]private UsuarioDAO usuarioDAO;

public void setUsuarioDAO&#40;UsuarioDAO usuarioDAO&#41; &#123;
	this.usuarioDAO = usuarioDAO;
&#125;[/code]

Não sei se fui clara, se precisar de mais alguma informação é só me falar.

Obrigada.