错误:

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)

解决方法:1、注意驱动包是否正确 驱动类的名字:oracle.jdbc.driver.OracleDriver

2、JDBC URL:jdbc:oracle:thin:@dbip:port:databasename

dbip –为数据库服务器的IP地址,如果是本地可写:localhost或127.0.0.1

port –为数据库的监听端口,需要看安装时的配置,缺省为1521。

databasename –为数据库的SID,通常为全局数据库的名字。

举例如果要访问本地的数据库aaaa,端口1521,那么URL写法如下:
                              jdbc:oracle:thin:@localhost:1521:aaaa

3、username和password 在properties文件中和xml文件中一定要对应上

jdbc连接oracle时报错 Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableC的更多相关文章

  1. Spring 整合Mybatis 出现了Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create Poola

    我出现的 报错信息如下: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionExc ...

  2. org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could

    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exc ...

  3. Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException:

    七月 17, 2014 4:56:01 下午 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service( ...

  4. Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server.

    报错信息:Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQL ...

  5. 【转载】在使用JDBC连接MySql时报错:You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support

    在使用JDBC连接MySql时报错:You must configure either the server or JDBC driver (via the serverTimezone config ...

  6. windows系统下的maven项目放到linux系统中运行时报org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnection这种异常的解决办法

    这个错误的解决办法其实很简单你把连接mysql数据库的那个jar包换成linux版本的就行了: linux版本的连接mysql数据库的jar包链接:http://files.cnblogs.com/f ...

  7. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver '

    问题摘要: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nest ...

  8. org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class

    转载自:http://songjianyong.iteye.com/blog/1663170 org.springframework.transaction.CannotCreateTransacti ...

  9. centos7 64位系统jdbc连接oracle报错问题

    这两天发生了一个错误,记录下来. 报错如下: ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could n ...

随机推荐

  1. [物理学与PDEs]第2章习题5 正应力的平均值

    设流场中流体的应力张量为 ${\bf P}=(p_{ij})$. 试证明: 在以某点为中心, $r$ 为半径的球面 $S_r$ 上的法向应力分量的平均值, 在 $r\to 0$ 时的极限为该点正应力的 ...

  2. Highcharts开发图表

    1.折线图 显示一个静态的折线图,显示如下数据 星期 温度 周一 9~14 周二 4~10 周三 1~7 周四 4~9 周五 5~11 周六 8~13 周天 7~10 新建demo1.html < ...

  3. unity发布的WebGL部署到IIS

    一.创建WebGL代码 在win7下,Unity3D中发布WebGL,然后部署到IIS,只要代码是对,关键是添加mime类型 二.为网站添加mime类型 .json text/json .unity3 ...

  4. SQL入门(1): 创建/查询/更新/连接/视图/SSMS简介

    本文介绍SQL的基本查询语句 (1) select... from  * 表示全部, 选择的东西还可以进行简单的运算, 可以列别名 select * from student; -sage from ...

  5. java----dom4j 解析XML

    dom4j: 由于内部采用迭代器,适合读取大文档: 数据块 1.下载 https://dom4j.github.io/ 2.添加包到工程目录下 使用 import org.dom4j.Document ...

  6. ssh项目问题01,为创建数据库抛出的异常

    框架什么都搭建好了,但是一直抛出如图问题,网上资料很多让你设置时间之类的,也设置了还是继续抛异常,最后带我的师傅说没有创建数据库,我都要郁闷死了,网上那么多,很多写的都不能解决问题,还乱写,浪费别人时 ...

  7. HTML5+CSS3点击指定按钮显示某些内容效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. Storm介绍及安装部署

    本节内容: Apache Storm是什么 Apache Storm核心概念 Storm原理架构 Storm集群安装部署 启动storm ui.Nimbus和Supervisor 一.Apache S ...

  9. Git一些简单但非常重要并常用的操作命令

    1.将本地与github进行关联配置 生成公钥 ssh-keygen -t rsa -C "jiasheng.mei@hpe.com" 将公钥拷贝到github中 在公钥同文件夹( ...

  10. Swagger-概述

    前言 Swagger 是一款RESTFUL接口的文档在线自动生成+功能测试功能软件.本文简单介绍了在项目中集成swagger的方法和一些常见问题.如果想深入分析项目源码,了解更多内容,见参考资料. S ...