`

spring Failed to convert property value of type [$Proxy10] to required type

 
阅读更多

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/common' defined in class path resource [com/ww/crm/biz/applicationContext.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 [$Proxy10] to required type [com.ww.crm.biz.impl.EmpDynamicRightBiz] for property 'iempDynRight'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10] to required type [com.ww.crm.biz.impl.EmpDynamicRightBiz] for property 'iempDynRight': 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 [$Proxy10] to required type [com.ww.crm.biz.impl.EmpDynamicRightBiz] for property 'iempDynRight'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10] to required type [com.ww.crm.biz.impl.EmpDynamicRightBiz] for property 'iempDynRight': no matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10] to required type [com.ww.crm.biz.impl.EmpDynamicRightBiz] for property 'iempDynRight': no matching editors or conversion strategy found
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1122)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:354)
    at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:295)
    at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

2011-12-18 7:16:51 org.apache.catalina.core.ApplicationContext log

 

当你看我的红色标识的提示时,可能已经知道自己错在什么地方.

在上面的报错中,我在action里面本应该引入一个接口,但我却引入接口的实例类,所有上错误提示中不能将代理type [$Proxy10] 转换成 type [com.ww.crm.biz.impl.EmpDynamicRightBiz] ,我把我的action中修改成[com.ww.crm.biz.IEmpDynamicRightBiz] 就行了.

分享到:
评论

相关推荐

    Java动态代理内存中生成的$Proxy0类

    Java动态代理内存中生成的$Proxy0类

    java.lang.NoSuchMethodException: com.sun.proxy.$Proxy58.list错误解决办法

    开发者创建了一个基类`BaseAction`,该类实现了Spring的`ModelDriven`接口,并且被声明为`@Component`,以便于Spring管理。同时,`BaseAction`还使用了`@Transactional`注解,表明其方法应具有数据库事务控制。 ...

    Failed to log into NFC Server

    1.Connect to the ESX host using SSH. For more information, see Connecting to an ESX host using an SSH client (1019852). 2.Take a backup of the /etc/vmware/config file using this command: cp /etc/...

    spring proxy代理模仿

    这里我们探讨的“spring proxy代理模仿”主要指的是Spring AOP(面向切面编程)中的动态代理实现。Spring AOP通过代理模式为我们提供了在运行时向目标对象添加拦截器或切面的能力,这在进行日志记录、性能监控、事务...

    解决 github项目clone报错 Failed connect to github.com:443; 解决

    系统环境:CentOS Linux release 7.6.1810 (Core) 起因:npm构建时报错 ... fatal: unable to access 'https://github.com/nhn/raphael.git/': Failed connect to github.com:443; Connection timed out npm

    PHP代理脚本php-proxy.zip

    php-proxy 是基于 PHP,Symfony 和 cURL 的代理脚本,这个库借鉴了 Glype,Jenssegers proxy 和 Guzzle 的经验。...// send the response back to the client $response->send(); 标签:phpproxy

    ProXY 4 To 6

    "ProXY 4 To 6" 是一个专门用于将IPv4网络连接转换为IPv6网络连接的软件工具。这个标题暗示了它可能是解决IPv4地址空间耗尽问题的一种解决方案,使得IPv4设备能够访问IPv6网络资源。 **描述分析:** 描述中的“Ipv4...

    SpringIOC,DI+dynamic proxy 实现盗版AOP

    本文将深入探讨如何使用Spring的IOC和DI特性,结合动态代理(Dynamic Proxy)来实现一种类似AOP(面向切面编程)的功能,以达到在不修改原有代码的情况下增强或拦截方法调用的目的。 **一、Spring IOC(控制反转)*...

    Spring示例_Printer_Spring_AOP_Spring_Proxy

    在本示例中,"Spring示例_Printer_Spring_AOP_Spring_Proxy" 主要关注的是Spring框架中的核心概念,特别是AOP(面向切面编程)和代理模式的应用。让我们深入探讨这些知识点。 首先,Spring框架是Java开发中最常用的...

    ngx_http_proxy_connect_module.zip

    在这个配置中,Nginx监听8080端口,当接收到CONNECT请求时,会尝试连接到配置的`$proxy_host:$proxy_port`。 使用该模块需要注意一些安全问题,因为透明代理可能被滥用为攻击跳板或绕过防火墙策略。为了安全起见,...

    Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:29.+ *****

    9. **检查Gradle的Proxy设置**:如果你在使用代理,确保Android Studio的代理设置是正确的,可以在`File` -> `Settings` -> ` Appearance & Behavior` -> `System Settings` -> `HTTP Proxy`中配置。 10. **更新...

    ProXY4To6-v2.4.zip

    《ProXY4To6:IPv4到IPv6的过渡技术详解》 在当前的互联网环境中,IPv4地址的枯竭已经成为一个不容忽视的问题。为了解决这个问题并推进下一代互联网IPv6的发展,各种过渡技术应运而生。其中,ProXY4To6是一个重要的...

    Spring源代码解析(五):Spring_AOP获取Proxy.doc

    本文将深入解析Spring AOP如何获取代理对象,即Proxy。 首先,我们需要理解AOP的核心概念: 1. **Advice**:通知,是切面实际执行的操作。在Spring中,Advice可以是Before、AfterReturning、AfterThrowing以及...

    解决代理转发post请求失败

    解决代理转发post请求失败

    rest-proxy:RestProxy

    use RestProxy\RestProxy; use RestProxy\CurlWrapper; $proxy = new RestProxy( Request::createFromGlobals(), new CurlWrapper() ); $proxy->register('github', 'https://api.github.com'); $proxy->run(); ...

    spring-boot-reference.pdf

    10. Installing Spring Boot 10.1. Installation Instructions for the Java Developer 10.1.1. Maven Installation 10.1.2. Gradle Installation 10.2. Installing the Spring Boot CLI 10.2.1. Manual ...

    Spring_0300_JDKProxy

    在Java编程领域,Spring框架是应用最广泛的IoC(Inversion of Control)和DI(Dependency Injection)容器之一。它提供了一种优雅的方式来管理对象的生命周期和依赖关系,并且还包含了强大的面向切面编程(AOP)支持...

    springmvc+spring+mybatis

    ### SpringMVC + Spring + MyBatis 整合配置详解 #### 一、技术栈介绍与选择 在本文档中,我们将详细介绍如何整合SpringMVC、Spring和MyBatis这三大框架来构建一个简单的Web应用。这三个框架在Java Web开发领域内...

    mastering-spring-cloud2018

    will learn how to enable different backend repositories of property sources and push change notifications using Spring Cloud Bus. We will compare discovery first bootstrap and config first bootstrap ...

    Spring 5 Design Patterns

    This book will take you through Design Patterns and best practices required with the Spring framework. You will learn to use these design patterns to solve common problems when designing an ...

Global site tag (gtag.js) - Google Analytics