Hello everybody

I have a big  problem in a project who I work with JSF and Spring.

The problem is the integration with Spring and JSF.

I get this error Message

2007-04-18 10:10:14,051 ERROR [main ] (ContextLoader.java:205) Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'articleHandler' defined in URL
[file:/C:/Documents%20and%20Settings/f0fp083/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/webapps/EDIWebJSF/WEB-INF/classes/applicationContext-
jsf.xml]: Error setting property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [$Proxy5] to required type [
br.com.teste.logic.command.masterdata.service.MasterdataService] for
property 'masterdataService'; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy5]
to required type [
br.com.teste.logic.command.masterdata.service.MasterdataService] for
property 'masterdataService': no matching editors or conversion strategy
found
Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property
value of type [$Proxy5] to required type [
br.com.teste.logic.command.masterdata.service.MasterdataService] for
property 'masterdataService'; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy5]
to required type [
br.com.teste.logic.command.masterdata.service.MasterdataService] for
property 'masterdataService': no matching editors or conversion strategy
found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy5]
to required type [
br.com.teste.logic.command.masterdata.service.MasterdataService] for
property 'masterdataService': no matching editors or conversion strategy
found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(
TypeConverterDelegate.java:224)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(
TypeConverterDelegate.java:139)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(
BeanWrapperImpl.java:772)

My ContextApplication.xml is hier
<beans
xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans
[url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";
[/url]

<!-- ========================= GENERAL DEFINITIONS
========================= -->

<bean id="messageSource"
class="org.springframework.context.support.Resourc eBundleMessageSource">
<property name="basenames">
<list>
<value>br.com.teste.ui.resource.test_messages</value>
<value>br.com.teste.ui.resource.security_messages</value>
</list>
</property>
</bean>

<!-- ========================= Start of SERVICE DEFINITIONS
========================= -->
<bean id="loginHandler" class="br.com.teste.ui.security.SimpleLoginHandler"
/>

<bean id="articleHandler" class="br.com.teste.ui.artikeldaten.ArticleManager
">
<property name="MasterdataService">
<ref bean="MasterdataService"/>
</property>
</bean>
</beans>

And there faces-config.xml is hier. :
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE faces-config PUBLIC
   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>

<faces-config>
  <!-- Supported locales are german and english -->
  <application>
     <!-- <view-handler>com.sun.facelets.FaceletViewHandler
</view-handler> -->
     <view-handler>
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl
</view-handler>
     <variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
     <locale-config>
        <default-locale>en</default-locale>

     </locale-config>
     <message-bundle>br.com.teste.ui.resource.test_messages
</message-bundle>
  </application>
</faces-config>


Some people said that I need to define the MasterdataService in the
contextApplication in Spring. But I already do that, and I get this error
Message again.

I change my applicationContext file to this


<beans
xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans[url]http://www.springframework.org/schema/beans/spring-
beans-2.0.xsd">[/url]

<!-- ========================= GENERAL DEFINITIONS
========================= -->

<bean id="messageSource"
class="org.springframework.context.support.Resourc eBundleMessageSource">
<property name="basenames">
<list>
<value>br.com.teste.ui.resource.test_messages</value>
<value>br.com.teste.ui.resource.security_messages</value>
</list>
</property>
</bean>

<!-- ========================= Start of SERVICE DEFINITIONS
========================= -->
<bean id="loginHandler" class="br.com.teste.ui.security.SimpleLoginHandler"/>


<bean id="articleHandler" class="
br.com.teste.ui.artikeldaten.ArticleManager">
<property name="MasterdataService">
<ref bean="MasterdataService"/>
</property>
</bean>

</beans>

And i get the same error message.

Please, I need Help.

thank you

Best regards
Edney

Reply via email to