Announcement Announcement Module
Collapse
No announcement yet.
Failed to convert property value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failed to convert property value

    I get an exception telling me that it cannot convert a property value.

    I understand that it is not the right type but AFAIK the TransactionProxyFactoryBean is magical and can be assigned to other types.
    This is my applicationContext.xml
    Code:
      <bean id="txProxyTemplate" abstract="true"
              class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
          <property name="transactionManager"><ref local="transactionManager"/></property>
          <property name="transactionAttributes">
            <props>
              <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
              <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
              <prop key="*">PROPAGATION_REQUIRED</prop>
            </props>
          </property>
      </bean>
    
    
      <bean id="cargaTablaFinanzasTarget" class="mx.com.santander.carterizacion.bo.FinanzasCargaTabla">
        <property name="finanzasDAO"><ref local="finanzasDAO"/></property>
      </bean>
    
      <bean id="cargaTablaFinanzas" parent="txProxyTemplate">
        <property name="target"><ref local="cargaTablaFinanzasTarget"/></property>
      </bean>
    
      <bean id="cargaTablaTraspaso" parent="txProxyTemplate">
        <property name="target"><ref local="cargaTablaTraspasoTarget"/></property>
      </bean>
    
      <bean id="cargaTablaServiceTarget" class="mx.com.santander.carterizacion.bo.CargaTablaService" >
        <property name="cargaTablaFinanzas"><ref local="cargaTablaFinanzas"/></property>
      </bean>
    
      <bean id="cargaTablaService" parent="txProxyTemplate">
        <property name="target"><ref local="cargaTablaServiceTarget"/></property>
      </bean>
    this is the exception:
    Code:
    PropertyAccessExceptionsException &#40;3 errors&#41;
    org.springframework.beans.TypeMismatchException&#58; Failed to convert property
    value of type &#91;$Proxy2&#93; to required type &#91;mx.com.santander.carterizacion.bo.FinanzasCargaTabla&#93;
    for property 'cargaTablaFinanzas'
    	at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary&#40;BeanWrapperImpl.java&#58;905&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;673&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;588&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;720&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValues&#40;BeanWrapperImpl.java&#58;747&#41;
    	at org.springframework.beans.BeanWrapperImpl.setPropertyValues&#40;BeanWrapperImpl.java&#58;736&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues&#40;AbstractAutowireCapableBeanFactory.java&#58;840&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean&#40;AbstractAutowireCapableBeanFactory.java&#58;662&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;270&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;205&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;204&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;136&#41;
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;236&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;284&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.refresh&#40;XmlWebApplicationContext.java&#58;131&#41;
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;97&#41;
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
    	at com.caucho.server.webapp.Application.start&#40;Application.java&#58;1530&#41;
    	at com.caucho.server.deploy.Entry.startImpl&#40;Entry.java&#58;457&#41;
    	at com.caucho.server.webapp.WebAppEntry.startImpl&#40;WebAppEntry.java&#58;85&#41;
    	at com.caucho.server.deploy.Entry.redeployIfModifiedImpl&#40;Entry.java&#58;416&#41;
    	at com.caucho.server.webapp.WebAppEntry.redeployIfModifiedImpl&#40;WebAppEntry.java&#58;85&#41;
    	at com.caucho.server.deploy.Entry.createLazyInstance&#40;Entry.java&#58;340&#41;
    	at com.caucho.server.webapp.WebAppEntry.createLazyInstance&#40;WebAppEntry.java&#58;85&#41;
    	at com.caucho.server.webapp.ApplicationContainer.getApplication&#40;ApplicationContainer.java&#58;795&#41;
    	at com.caucho.server.webapp.ApplicationContainer.buildInvocation&#40;ApplicationContainer.java&#58;669&#41;
    	at com.caucho.server.host.Host.buildInvocation&#40;Host.java&#58;515&#41;
    	at com.caucho.server.host.HostContainer.buildInvocation&#40;HostContainer.java&#58;296&#41;
    	at com.caucho.server.resin.ServletServer.buildInvocation&#40;ServletServer.java&#58;550&#41;
    	at com.caucho.server.dispatch.DispatchServer.buildInvocation&#40;DispatchServer.java&#58;175&#41;
    	at com.caucho.server.http.HttpRequest.handleRequest&#40;HttpRequest.java&#58;244&#41;
    	at com.caucho.server.port.TcpConnection.run&#40;TcpConnection.java&#58;327&#41;
    	at com.caucho.util.ThreadPool.runTasks&#40;ThreadPool.java&#58;450&#41;
    	at com.caucho.util.ThreadPool.run&#40;ThreadPool.java&#58;394&#41;
    	at java.lang.Thread.run&#40;Thread.java&#58;536&#41;

  • #2
    Humberto,

    does FinanzasCargaTabla implement any interfaces? if so, change the code of CargaTablaService to use the interface instead of the concreate Class.

    HTH

    Comment

    Working...
    X