Chinaunix首页 | 论坛 | 博客
  • 博客访问: 218547
  • 博文数量: 11
  • 博客积分: 2511
  • 博客等级: 少校
  • 技术积分: 555
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-31 22:52
文章分类

全部博文(11)

文章存档

2009年(1)

2008年(10)

我的朋友

分类: 系统运维

2008-06-28 14:15:24

org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type

[com.brilliance.struts.service.impl.InvestServiceImpl] for property 'fundService'; nested exception is

java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type

[com.brilliance.struts.service.impl.InvestServiceImpl] for property 'fundService': no matching editors or conversion strategy

found

在spring事务时会出现。
解决办法是:
在事务中加上下面语句

   true
 

表面proxy代理的是类而不是接口。

 

下面是我的事务配置:

    class="org.springframework.orm.hibernate3.HibernateTransactionManager">
   
    
   

  

     class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
   
    
     PROPAGATION_REQUIRED, -Exeptions
    

   

  

     class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
   lazy-init="true">
   
   true
 

   
    
   

   
    
   

  

  
   
    
   

  

..............

  class="com.brilliance.struts.action.UpdateFundAction">
  
   
  

 

阅读(9482) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-03-11 21:38:42

楼上,太感谢你了,解决困扰我多时的问题

chinaunix网友2008-09-25 17:13:04

大哥,你太有才了! 解决了!我用的是Java5注解的方式 配置时 老师报类似的错误。 变成 就ok来!!!!

chinaunix网友2008-09-16 23:38:01

楼主是个好人,