Unable to instantiate Action, searchAction, defined for 'search' in namespace '/'Error creating bean with name 'searchAction' defined in file [E:\dhccworkPlace\EmergencyWeb\src\main\webapp\WEB-INF\classes\spring\applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service': no matching editors or conversion strategy found
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:318)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:399)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchAction' defined in file [E:\dhccworkPlace\EmergencyWeb\src\main\webapp\WEB-INF\classes\spring\applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service': no matching editors or conversion strategy found
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:141)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:150)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:120)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:299)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:399)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root causeactionstrutssshexception
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:318)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:399)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchAction' defined in file [E:\dhccworkPlace\EmergencyWeb\src\main\webapp\WEB-INF\classes\spring\applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy10 implementing com.dhcc.test.service.SearchImp,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.dhcc.test.service.impl.Search] for property 'service': no matching editors or conversion strategy found
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:141)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:150)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:120)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:299)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:399)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
root causeactionstrutssshexception
解决方案 »
- 求教高人修改jsp的css和图片后,页面显示却无法更新,问题解决立即结贴散分,在线急等。。。
- 同一个Jboss中启动多个服务
- hibernate 一对多如何 用主表 get出其他表的属性~~~~~~~~~~
- request初始化问题
- jsp 关于mysql的备份与恢复?请大家给点思路
- JSP 显示问题,各位帮我看看如何实现.....
- 关于用javascript制作地址簿效果的问题!!
- 几个经常会碰到的问题的请教
- 关于jbulider8运行servlet问题(问题解决就结帖)
- 谁对weblogic6.1比较熟请进来帮帮我谢谢了 真的很急啊
- 各位大神们,帮帮小弟!javaweb下载ftp不是下载到本机,而下载到服务器上!怎么才能下载到本机!
- JSP 类似于腾讯qq空间照片 点小图在上面出现大图
<bean id="searchService" class="com.dhcc.test.service.impl.Search" autowire="byName"></bean>
<!-- Action -->
<bean id="searchAction" class="com.dhcc.test.action.EmployerAction" scope="prototype">
<property name="service" ref="searchService">
</property>
</bean>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="default" extends="struts-default" namespace="/">
<!-- 定义处理请求URL为login.action的Action -->
<action name="search" class="searchAction">
<!-- 定义处理结果字符串和资源之间的映射关系 -->
<result name="SUCCESS">/welcome.html</result>
</action>
</package>
</struts> 这是struts2的配置文件