April 10, 2014 9:40:34 pm Org.apache.catalina.core.StandardContext Listenerstart
Severe:exception sending context initialized event to listener instance of class Org.springframework.web.context.Context Loaderlistener
Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name '/patient ' defined in ServletContext resource [/web-inf/applicationcontext.xml]: Initialization of Bean failed; Nested exception is org.springframework.beans.ConversionNotSupportedException:Failed to convert property value of type ' Com.sun.proxy. $Proxy implementing Com.assistant.hibernate.dao.IPatientDAO, Org.springframework.beans.factory.initializingbean,org.springframework.aop.springproxy, Org.springframework.aop.framework.Advised ' to required type ' Com.assistant.hibernate.dao.PatientDAO ' for property ' Patientdao '; Nested exception is Java.lang.IllegalStateException:Cannot convert value of type [Com.sun.proxy. $Proxy Implementing CO M.assistant.hibernate.dao.ipatientdao,org.springframework.beans.factory.initializingbean, Org.springframework.aop.springproxy,org.springframework.aop.framework.advised] to required type [ Com.assistant.hibernate.dao.PatientDAO] for property ' Patientdao ': no matching EDItors or conversion strategy found
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:527)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:456)
At Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory.java:291)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:222)
At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:288)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:190)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:580)
At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:895)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:425)
At Org.springframework.web.context.ContextLoader.createWebApplicationContext (contextloader.java:276)
At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:197)
At Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:47)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4779)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5273)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:895)
At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:871)
At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:615)
At Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1099)
At Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1621)
At Java.util.concurrent.executors$runnableadapter.call (executors.java:471)
At Java.util.concurrent.futuretask$sync.innerrun (futuretask.java:334)
At Java.util.concurrent.FutureTask.run (futuretask.java:166)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615)
At Java.lang.Thread.run (thread.java:724)
caused By:org.springframework.beans.ConversionNotSupportedException:Failed to convert property value of type ' Com.sun.proxy. $Proxy implementing Com.assistant.hibernate.dao.IPatientDAO, Org.springframework.beans.factory.initializingbean,org.springframework.aop.springproxy, Org.springframework.aop.framework.Advised ' to required type ' Com.assistant.hibernate.dao.PatientDAO ' for property ' Patientdao '; Nested exception is Java.lang.IllegalStateException:Cannot convert value of type [Com.sun.proxy. $Proxy Implementing CO M.assistant.hibernate.dao.ipatientdao,org.springframework.beans.factory.initializingbean, Org.springframework.aop.springproxy,org.springframework.aop.framework.advised] to required type [ Com.assistant.hibernate.dao.PatientDAO] for property ' Patientdao ': no matching editors or conversion strategy
At Org.springframework.beans.BeanWrapperImpl.convertIfNecessary (beanwrapperimpl.java:462)
At Org.springframework.beans.BeanWrapperImpl.convertForProperty (beanwrapperimpl.java:499)
At Org.springframework.beans.BeanWrapperImpl.convertForProperty (beanwrapperimpl.java:493)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty ( abstractautowirecapablebeanfactory.java:1371)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues ( abstractautowirecapablebeanfactory.java:1330)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1086)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:517)
... More
caused By:java.lang.IllegalStateException:Cannot convert value of type [Com.sun.proxy. $Proxy Implementing Com.assistant.hibernate.dao.ipatientdao,org.springframework.beans.factory.initializingbean, Org.springframework.aop.springproxy,org.springframework.aop.framework.advised] to required type [ Com.assistant.hibernate.dao.PatientDAO] for property ' Patientdao ': no matching editors or conversion strategy
At Org.springframework.beans.TypeConverterDelegate.convertIfNecessary (typeconverterdelegate.java:231)
At Org.springframework.beans.BeanWrapperImpl.convertIfNecessary (beanwrapperimpl.java:447)
... More
No interface DAO proxy error,
Wrong wording: Patientdao Patientdao;
The correct wording: Ipatientdao Patientdao;
A patientdaoproxy is injected after an AOP slice
So inject service in the controller layer, or inject DAO in service layer, type must write interface name, can't write class name.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.