问题描述
严重:action:nullorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'/login'definedinServletContextresource[/WEB-INF/classes/action.xml]:Initializationofbeanfailed;nestedexceptionisorg.springframework.beans.TypeMismatchException:Failedtoconvertpropertyvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh';nestedexceptionisjava.lang.IllegalArgumentException:Cannotconvertvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh':nomatchingeditorsorconversionstrategyfoundatorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)atjava.security.AccessController.doPrivileged(NativeMethod)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)atorg.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:354)atorg.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:295)atorg.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)atorg.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)atorg.apache.struts.action.ActionServlet.init(ActionServlet.java:336)atjavax.servlet.GenericServlet.init(GenericServlet.java:212)atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)atorg.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)atorg.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4659)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:785)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)atorg.apache.catalina.core.StandardService.start(StandardService.java:519)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:581)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Causedby:org.springframework.beans.TypeMismatchException:Failedtoconvertpropertyvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh';nestedexceptionisjava.lang.IllegalArgumentException:Cannotconvertvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh':nomatchingeditorsorconversionstrategyfoundatorg.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)...43moreCausedby:java.lang.IllegalArgumentException:Cannotconvertvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh':nomatchingeditorsorconversionstrategyfoundatorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:219)atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)atorg.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)...47more2010-12-920:18:35org.apache.catalina.core.ApplicationContextlog信息:Markingservletactionasunavailable2010-12-920:18:35org.apache.catalina.core.StandardContextloadOnStartup严重:Servlet/myprojectthrewload()exceptionjavax.servlet.UnavailableExceptionatorg.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:880)atorg.apache.struts.action.ActionServlet.init(ActionServlet.java:336)atjavax.servlet.GenericServlet.init(GenericServlet.java:212)atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)atorg.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)atorg.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4659)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:785)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)atorg.apache.catalina.core.StandardService.start(StandardService.java:519)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:581)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)2010-12-920:18:35org.apache.catalina.startup.HostConfigdeployDirectory信息:DeployingwebapplicationdirectoryROOT2010-12-920:18:36org.apache.coyote.http11.Http11Protocolstart信息:StartingCoyoteHTTP/1.1onhttp-80802010-12-920:18:36org.apache.jk.common.ChannelSocketinit信息:JK:ajp13listeningon/0.0.0.0:80092010-12-920:18:36org.apache.jk.server.JkMainstart信息:JkrunningID=0time=0/131config=null2010-12-920:18:36org.apache.catalina.startup.Catalinastart信息:Serverstartupin43487ms[/b]
解决方案
解决方案二:
不能转化的错误Failedtoconvertpropertyvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh';nestedexceptionisjava.lang.IllegalArgumentException:Cannotconvertvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh':nomatchingeditorsorconversionstrategyfound
解决方案三:
action.xml配置贴出来看看
解决方案四:
表单数据转换出错
解决方案五:
org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'/login'definedinServletContextresource[/WEB-INF/classes/action.xml]:Initializationofbeanfailed;nestedexceptionisorg.springframework.beans.TypeMismatchException:Failedtoconvertpropertyvalueoftype[$Proxy0]torequiredtype[org.csdn.IBIZ.IBIZHelper]forproperty'ibizh';可能是,ibizh类型有问题?
解决方案六:
配置文件中注入的bean不正确。
解决方案七:
这样的错误最好先从你的web.xml开始找问题,然后找struts的配置文件,然后是spring配置文件,然后Hibernate的相关配置,看楼主这个问题应该是不是Hibernate的问题。先找找看吧,这种问题基本上谷歌都能搞定的。