eclipse中使用postgreSQL报错( Cannot load JDBC driver class )
需求:
使用Maven插件调用PostgreSQL数据库
环境:
eclipse_4.5.0+JDK_1.7+Tomcat_7.0+Maven+postgresql-9.1-901.jdbc4.jar
问题:
将maven工程在tomcat启动之后,出现错误字符串,主要错误信息如下:
Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.postgresql.Driver'
解决方案:
打开工作空间的pom.xml文件,在<dependencies>标签中添加或者修改 postgresql 数据驱动 为:
<!-- java postgresql 数据驱动-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1100-jdbc41</version>
</dependency>
eclipse中使用postgreSQL报错( Cannot load JDBC driver class )的更多相关文章
- eclipse 中新建文件报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Buil
在eclipse中新建文件报错错误提示如下: The superclass "javax.servlet.http.HttpServlet" was not found on th ...
- K.O. -------- Eclipse中Maven的报错处理
----------------------siwuxie095 K.O. -------- Eclipse 中 Maven 的报错处理 ...
- Eclipse中启动tomcat报错:A child container failed during start
我真的很崩溃,先是workspace崩了,费了好久重建的workspace,然后建立了一个小demo项目,tomcat中启动却报错,挑选其中比较重要的2条信息如下: A child container ...
- spring配置hibernate在使用oracle驱动时报错Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver '
在看到这个错误的时候就感觉有点不对劲了,在错误的结尾和引号之间还有空间,如果敏锐的点应该察觉到可能是空格问题.由于本人的粗心导致这个问题一直困扰了我接近一个上午. 在排查这个问题的时候首先想到的就是关 ...
- Eclipse中启动Tomcat报错:[There is insufficient memory for the Java Runtime Environment to continue.]的解决方案
1,报错截图 2,报错信息 五月 08, 2018 9:57:58 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [Se ...
- Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法
有的项目引用了太多的jar包,或者反射生成了太多的类,异或有太多的常量池,就有可能会报java.lang.OutOfMemoryError: PermGen space的错误, 我们知道可以通过jvm ...
- Eclipse中mvn install 报错error in opening zip file
报错信息 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (de ...
- Eclipse中JSON文件报错,如何解决?
eclipse里面的JSON文件老报错,虽然可以正常运行,但红X看起来就是不爽,怎么解决呢? 这是因为Eclipse认为JSON文件不需要注释,所以报的编译错误,我们可以通过Eclipse的设置把它的 ...
- Eclipse中maven项目报错:org.springframework.web.filter.CharacterEncodingFilter
写了一个demo,发现在tomcat中部署完项目,启动时报错. 1,问题描述 2,解决办法 1)程序在部署完成后报错,说明是程序是编译通过的,即编译编译路径Java Build Path没问题.2)此 ...
随机推荐
- SuperSocket接收过滤器工厂(ReceiveFilterFactory)
接收过滤器工厂(ReceiveFilterFactory)用于为每个会话创建接收过滤器. 定义一个过滤器工厂(ReceiveFilterFactory)类型, 你必须实现接口 IReceiveFilt ...
- 为你的 SuperSocket 启用动态语言
步骤如下: 1.添加 DLR (dynamic language runtime) 配置片段; Section 定义: <section name="microsoft.scripti ...
- 【机器学习】【条件随机场CRF-3】条件随机场的参数化形式详解 + 画出对应的状态路径图 + 给出对应的矩阵表示
1.条件随机场概念CRF,Conditional Random Field,是给定一组输入随机变量条件下另一组输出随机变量的条件概率分布模式,其特点是假设输出随机变量构成马尔可夫随机场. 条件随机场用 ...
- 2013-10-7 设置combboxItem高度的方法
//首先设置一个较大的 ItemHeight 值,比如 20: //然后设置 ComboBox 的 DrawMode 为 OwnerDrawVariable: //再设置DrawItem事件如下 if ...
- mybatis 基础理解resultType和resultMap
resultType和resultMap: 1.resultType: 一.返回一般数据类型比如要根据 id 属性获得数据库中的某个字段值. mapper (dao)接口: // 根据 id 获得数据 ...
- JS精度问题,解决方案 math.js
JS精度问题 Vue中使用 解决方案 math.js npm install mathjs import { create, all } from 'mathjs' const config = ...
- HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite
org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite r ...
- H3C IPv6邻居发现协议
- The bind() Method
The bind() method was added in ESMAScript 5, but it is easy to simulate in ESMAScrpt 3. As its name ...
- junit 测试套件Suite
junit测试套件,就是可以运行一个测试类使得一个或一些测试类被junit测试运行 见代码: 测试套件类: import org.junit.runner.RunWith; import org.ju ...