01.Eclipse tomcat数据源配置Unable to find [jdbc]
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了01.Eclipse tomcat数据源配置Unable to find [jdbc]相关的知识,希望对你有一定的参考价值。
一、问题情境
通常情况下如果eclipse中配置tomcat时,本地tomcat本地目录中的context.xml没有配置数据源时,
eclipse中配置tomcat已经配置完成,在其中运行web项目时,会报如下错误
Unable to find [jdbc].
警告: Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘mapper.ImplicitCollectionMapping‘ defined in URL [jar:file:/D:/JAVA开发资料/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/hap/WEB-INF/lib/xstream-1.4.1.jar!/com/thoughtworks/xstream/mapper/Mapper$ImplicitCollectionMapping.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory‘: Error creating bean with name ‘sqlSessionFactory‘ defined in file [D:\\JAVA开发资料\\eclipse_workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\hap\\WEB-INF\\classes\\spring\\applicationContext.xml]: Cannot resolve reference to bean ‘dataSource‘ while setting bean property ‘dataSource‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in file [D:\\JAVA开发资料\\eclipse_workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\hap\\WEB-INF\\classes\\spring\\applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name [jdbc/hap_dev] is not bound in this Context. Unable to find [jdbc].; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory‘ defined in file [D:\\JAVA开发资料\\eclipse_workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\hap\\WEB-INF\\classes\\spring\\applicationContext.xml]: Cannot resolve reference to bean ‘dataSource‘ while setting bean property ‘dataSource‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in file [D:\\JAVA开发资料\\eclipse_workspace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\hap\\WEB-INF\\classes\\spring\\applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name [jdbc/hap_dev] is not bound in this Context. Unable to find [jdbc].
二、eclipse中配置tomcat重新配置数据源
按照如图配置即可
三、JNDI配置方法
http://blog.csdn.net/sunvsjay1890/article/details/52694285
http://www.cnblogs.com/xuan52rock/p/4745241.html以上是关于01.Eclipse tomcat数据源配置Unable to find [jdbc]的主要内容,如果未能解决你的问题,请参考以下文章
错误记录Android Studio 配置 GitHub 报错 ( Can‘t login using given credentials: Request response: 401 Una )(代
错误记录Android Studio 配置 GitHub 报错 ( Can‘t login using given credentials: Request response: 401 Una )(代
sql Reemplazar una cadena de una columna en una tabla。 MySQL REPLACE。
sql Reemplazar una cadena de una columna en una tabla。 MySQL REPLACE。