Cannot resolve class or package 'dbcp' Cannot resolve class 'BasicDataSource'
在applicationContext.xml中配置数据源时,报错如下:
Cannot resolve class or package 'dbcp'
Cannot resolve class 'BasicDataSource'
错误原因:
可能是没有导入common-dbcp.jar包,也可能是导入的jar包版本不正确。
解决方法:
下载jar包并导入,jar包地址如下:
https://commons.apache.org/proper/commons-dbcp/download_dbcp.cgi
如果是Java 7.0及其以上,需要导入common-dbcp2.jar
并在applicationContext.xml修改配置,将dbcp改为dbcp2,如下示
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close" > </bean>
Cannot resolve class or package 'dbcp' Cannot resolve class 'BasicDataSource'的更多相关文章
- 异常 Cannot resolve class or package
spring boot yml配置异常Cannot resolve class or package 是因为mvaen设置 pom.xml的文件配置如上,scope 范围指定为runtime,runt ...
- Cannot resolve class or package 'mysql’处理方法
在application.properties中配置mybatis_plus碰见报了这个错误 Cannot resolve class or package 'jdbc' 错误产生的原因 其实这个问题 ...
- swagger list Could not resolve reference because of: Could not resolve point
swagger list Could not resolve reference because of: Could not resolve point controller的参数要加 @Requ ...
- Cannot resolve class or package 'mysql’
一:当使用Spring Boot 2.0 整合MySQL的时候配置可能会出现这个故障 目前开始选用新的名称:com.mysql.cj.jdbc.Driver 二:其次,爆红产生错误分析 其实这个问题是 ...
- Cannot resolve class or package 'springframework' less... (Ctrl+F1) Inspection info:Spring XML mode
其实这个问题是由于MySQL 这个jar 包依赖类型默认是runtime ,也就是说只有运行时生效,所以虽然这里报错,但是不影响你代码运行. 解决方案: 将runtime 修改为Compile 即可 ...
- Ssm框架常见报错
错误1: The origin server did not find a current representation for the target resource or is not willi ...
- Springboot连接数据库 (解决报错)
好家伙,来解决报错 1.新建项目时, 将SQL的" Spring Date 'jdbc' "点上 2.使用idea快速创建springboot项目时会出现连接不到服务器的情况 这里 ...
- webpack学习笔记--配置resolve
Resolve Webpack 在启动后会从配置的入口模块出发找出所有依赖的模块,Resolve 配置 Webpack 如何寻找模块所对应的文件. Webpack 内置 JavaScript 模块化语 ...
- Unable to resolve target 'android-XX'解决办法
在搭建好安卓编译环境后,我用Eclipse导入冲git上下载的安卓源码编译时,会提示 Unable to resolve target 'android-17' 等 “Unable to resolv ...
随机推荐
- 杂项:BugFree
ylbtech-杂项:BugFree BugFree是借鉴微软的研发流程和Bug管理理念,使用PHP+MySQL独立写出的一个Bug管理系统.简单实用.免费并且开放源代码(遵循GNU GPL). 命名 ...
- SQL 字段查找
select [name] from sysobjects where [id] in (select [id] from syscolumns where [name]='a1') SQL 2005 ...
- tomcat 加载顺序 web.xml文件详解
一. 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Se ...
- [UE4]把枪抽象为一个类
- [datatable]关于在DataTable中执行DataTable.Select("条件")返回DataTable的解决方法
-- :09关于在DataTable中执行DataTable.Select("条件")返回DataTable的解决方法 在实际编程工程中,常常遇到这样的情况:DataTable并不 ...
- 【Linux_Unix系统编程】chapter5 深入探究文件IO
Chapter5 深入探究文件I/O 本章节将介绍另一个与文件操作相关的系统调用:多用途的fcntl(),并展示其应用之一读取和设置打开文件的状态标志. 5.1 原子操作和竞争条件 所有系统调用都是以 ...
- ESB初步配置文件认识
每个项目的都有各自的场景,但是其实往小处说,场景的处理基本都是很相似,之前做copy文件的程序,其实就是一种很常见的ETL的过程(转移文件,异构系统通过文件系统交换数据,存在数据同步). 了解一下ET ...
- 使用SolrNet访问Solr-5.5.0
由于今年年初刚发布的Solr-5.5.0,网上所能找到的资料少之又少,所以只能靠自己一点点摸索. 从某Hub上下载了SolrNet源码,按照教程提交文档或者查询均失败,无奈只得跟断点一点点差怎么回事. ...
- 本地git仓库常用操作
SSH配置: 本机创建SSH key $ ssh-keygen -t rsa -C "youremail@example.com" 将SSHkey添加到git仓库:id_rsa.p ...
- 33. Linux安装配置JDK-7
安装说明 系统环境:centos-6.3安装方式:rpm安装 软件:jdk-7-linux-x64.rpm下载地址:http://www.oracle.com/technetwork/java/jav ...