Oracle连接报错之IO异常(The Network Adapter could not establish the connection)
简单介绍:自己封装oracle jdbc的一些常用功能jar包,自己本机玩没啥问题,给别人玩儿,发现总是抛异常
IO异常(The Network Adapter could not establish the connection)
为什么呢?
首先 conn 不是全局的,最好声明为全局的,使用单例 比较好,然后进行业务操作的方法中都会去调用一个返回值是conn的方法getConnection(),
通常情况下,我们一般使用完数据库连接的时候,都会在finally中进行 conn pst(PrepareStatement) rs(ResultSet) 的资源关闭,问题就出在这里.
虽然我们关闭了conn,应该在conn.close()方法的下一行 使conn==null,更好一点。
Oracle连接报错之IO异常(The Network Adapter could not establish the connection)的更多相关文章
- 数据库连接报错之IO异常(The Network Adapter could not establish the connection)
Io 异常: The Network Adapter could not establish the connection 有以下四个原因: 1.oracle配置 listener.ora 和tnsn ...
- oracle:程序后台提示Io异常: The Network Adapter could not establish the connection)
今天要用tomcat部署一个系统,windows环境下,oracle和程序在一台机器上. 在配置jndi时,直接写成 jdbc:oracle:thin:@127.0.0.1:1521:orcl.启动程 ...
- Io 异常: The Network Adapter could not establish the connection
新接触一个项目,导入源码,在本地启动的时候后台报了一个错误: Could not discover the dialect to use. java.sql.SQLException: Io 异常: ...
- Io 异常: The Network Adapter could not establish the connection解决方案
Io 异常: The Network Adapter could not establish the connection解决方案 2016年06月04日 13:30:21 阅读数:46589 Io ...
- Io 异常: The Network Adapter could not establish the connection 解决方法
1.IP错误: 在设置URL时错误,例如:jdbc:oracle:thin:@192.168.1.80:1521:orcl 数据库服务器是否正确:ping 服务器IP是否通畅.ping不通则将URL更 ...
- [Oracle] Io Error: The Network Adapter could not establish the connection 解决方案
Io 异常: The Network Adapter could not establish the connection这个异常的出现一般与数据库和你的PC的设置有关 这种异常的出现大致上有下面几种 ...
- sqldeveloper建立新的连接是出现Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection
Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection解决办法: ...
- Oracle安装后遇到错误:The Network Adapter could not establish the connection
http://note.youdao.com/noteshare?id=e6baee7ea7b7f60d7a265124e2bdd46c&sub=988945C6DDE843D5A7D6588 ...
- IO 异常:The Network Adapter could not establish the connection 怎么解决
IO 异常:The Network Adapter could not establish the connection 怎么解决
随机推荐
- springboot使用多个@RestControllerAdvice时的拦截顺序
我们的项目中经常会使用到别人的模块,例如我的项目demo,要依赖别人的A模块,以及基础的核心core模块,此时core模块有一个使用了@RestControllerAdvice的类,负责拦截所有的co ...
- 入门大数据---基于Zookeeper搭建Kafka高可用集群
一.Zookeeper集群搭建 为保证集群高可用,Zookeeper 集群的节点数最好是奇数,最少有三个节点,所以这里搭建一个三个节点的集群. 1.1 下载 & 解压 下载对应版本 Zooke ...
- Netty源码学习系列之5-NioEventLoop的run方法
前言 NioEventLoop的run方法,是netty中最核心的方法,没有之一.在该方法中,完成了对已注册的channel上来自底层操作系统的socket事件的处理(在服务端时事件包括客户端 ...
- 每日一题 - 剑指 Offer 37. 序列化二叉树
题目信息 时间: 2019-06-29 题目链接:Leetcode tag:序列化 二叉树 队列 难易程度:中等 题目描述: 请实现两个函数,分别用来序列化和反序列化二叉树. 示例: 1 / \ 2 ...
- centos7-网络以及网卡配置
注:centos6.8配置的话直接命令行输入setup配置 1.配置文件目录: /etc/sysconfig/network-scripts/ifcfg-ens33 2.配置文件内容: centos7 ...
- 让windows原生CMD使用ls命令
1.新建ls.bat. 2.编辑内容: @echo off dir 3.将ls.bat文件放到C:\Windows目录下. 效果:
- Linux多任务编程之二:fork()函数及其基础实验(转)
来源:CSDN 作者:王文松 转自Linux公社 fork()函数 在 Linux 中创建一个新进程的唯一方法是使用fork()函数.fork()函数是 Linux 系统中一个非常重要的函数,和咱们 ...
- 双向绑定和 vuex 是否冲突
在严格模式下确实有问题,解决方案: https://vuex.vuejs.org/zh/guide/forms.html
- 题解:2018级算法第六次上机 C6-不Nan的过河
题目描述: 样例: 实现解释: 一道因为没排序做了一个小时没做出来的二分答案模板题(手动呲牙) 知识点: 二分答案,最大值最小化 坑点: 排序,judge(mid)函数内计数的实现 其实从最长一步的最 ...
- 基于three.js的全景
直接上代码: <!DOCTYPE html><html> <head> <title>three.js css3d - panorama</tit ...