first, the problem situationTypically, if Tomcat is configured in Eclipse, context.xml in the local Tomcat local directory does not have a data source configured,
Configuring Tomcat in Eclipse has been configured and will report the following error when running Web projects in
unable to find [JDBC].
Warning: 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 development data/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 development materials \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 development data \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 isjavax.naming.NameNotFoundException: Name [Jdbc/hap_dev] is not bound in this Context. Unable to find [JDBC].; Nested exception isorg.springframework.beans.factory.BeanCreationException: Error creating Bean with Name ' sqlsessionfactory ' defined in file [D:\JAVA development data \eclipse_workspace\.metadata\.plugins\ Org.eclipse.wst.server.core\tmp0\wtpwebapps\hap\web-inf\classes\spring\applicationcontext.xml]: Cannot Resolve Reference to Beans ' dataSource ' while the setting bean property ' DataSource '; Nested exception isorg.springframework.beans.factory.BeanCreationException: Error creating Bean with Name ' DataSource ' defined in file [D:\JAVA development data \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 isjavax.naming.NameNotFoundException: Name [Jdbc/hap_dev] is not bound in this Context. Unable to find [JDBC].
TwoConfiguring the Tomcat reconfiguration data source in Eclipse
You can follow the configurationThird, Jndi configuration method http://blog.csdn.net/sunvsjay1890/article/details/52694285
Http://www.cnblogs.com/xuan52rock/p/4745241.html
Null
01.Eclipse Tomcat Data Source Configuration Unable to find [JDBC]