异常:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in class path
resource [spring/applicationContext.xml]: Initialization of bean
failed; nested exception is
org.springframework.beans.ConversionNotSupportedException: Failed
to convert property value of type 'java.lang.String' to required
type 'javax.sql.DataSource' for property 'dataSource'; nested
exception is java.lang.IllegalStateException: Cannot convert value
of type [java.lang.String] to required type [javax.sql.DataSource]
for property 'dataSource': no matching editors or conversion
strategy found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
at
at
at
at
at
at
Caused by:
org.springframework.beans.ConversionNotSupportedException: Failed
to convert property value of type 'java.lang.String' to required
type 'javax.sql.DataSource' for property 'dataSource'; nested
exception is java.lang.IllegalStateException: Cannot convert value
of type [java.lang.String] to required type [javax.sql.DataSource]
for property 'dataSource': no matching editors or conversion
strategy found
at
org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.
... 25
more
Caused by: java.lang.IllegalStateException: Cannot convert value of
type [java.lang.String] to required type [javax.sql.DataSource] for
property 'dataSource': no matching editors or conversion strategy
found
at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.
at
org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.
... 31
more
2017-3-29 22:44:09 org.apache.catalina.core.StandardContext
listenerStart
严重: Exception sending context initialized event to listener
instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in class path
resource [spring/applicationContext.xml]: Initialization of bean
failed; nested exception is
org.springframework.beans.ConversionNotSupportedException: Failed
to convert property value of type 'java.lang.String' to required
type 'javax.sql.DataSource' for property 'dataSource'; nested
exception is java.lang.IllegalStateException: Cannot convert value
of type [java.lang.String] to required type [javax.sql.DataSource]
for property 'dataSource': no matching editors or conversion
strategy found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.
at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
at
at
at
at
at
at
Caused by:
org.springframework.beans.ConversionNotSupportedException: Failed
to convert property value of type 'java.lang.String' to required
type 'javax.sql.DataSource' for property 'dataSource'; nested
exception is java.lang.IllegalStateException: Cannot convert value
of type [java.lang.String] to required type [javax.sql.DataSource]
for property 'dataSource': no matching editors or conversion
strategy found
at
org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableB