Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connec
来源:互联网 发布:室外地垫 知乎 编辑:程序博客网 时间:2024/05/29 14:06
Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connection ) 最近使用ORACLE数据库作项目,创建连接池的时候出现Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connection )错误,后来发现原来连接池里的URL配置和listener里面的不一致,必须同为机器名或者同为IP地址发,否则就出现以上错误==================================================================1、IP错误:
在设置URL时错误,例如:jdbc:oracle:thin:@192.168.1.80:1521:orcl
数据库服务器是否正确:ping 服务器IP是否通畅。ping不通则将URL更改正确。
端口号是否正确。
进行一下操作:在DOS上键入sqlplus,检查oracle是否开启
一切正常则执行下面第2步。
2、防火墙
如果机器上安装有放火墙,可能是服务器端口号屏蔽而造成的。关闭防火墙后,尝试重新连接。
仍然不行则执行第3步。
3、数据库监听器未启动 修改PC上注册表中的ImagePath值。
下面以ORACLE数据库为例
重新手动启动数据库监听:
1:开始 → 运行→ 输入CMD→ 进入DOS命令提示界面
d:>lsnrctl
LSNRCTL> status
或者
LSNRCTL> start
如果是类似图片中的信息
恭喜,你的问题已经查找出来,是数据库监听器未启动而造成的。
以下是手动启动数据库的方法:
在运行处执行regedit进入注册表到
开始 →运行→ regedit
按下面路径
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleOraHome90TNSListener
找到OracleOraHome90TNSListener(我用的是Oracle9i 其他的版本的应该是OracleOraHomexxxTNSListener)
找到之后你会发现ImagePath关键值不存在了,创建它:(存在的话,点击修改,修改方法在下文有介绍)
右键单击,弹出菜单选择新键(N)→字符串值(S)
将其命名为ImagePath
选中ImagePath点右键,选中修改:
在值中输入你的Oracle安装目录\ora90(其他版本对应的是oraxxx目录)\bin\tnslsnr
确定后退出注册表:
再在DOS命令下键入start
如果出现下面画面,恭喜你,监听器启动成功:
关闭DOS,启动你的程序进行测试,应该恢复正常了。 以上就是3中常见的引发The Network Adapter could not establish the connection 异常的原因。
在设置URL时错误,例如:jdbc:oracle:thin:@192.168.1.80:1521:orcl
数据库服务器是否正确:ping 服务器IP是否通畅。ping不通则将URL更改正确。
端口号是否正确。
进行一下操作:在DOS上键入sqlplus,检查oracle是否开启
一切正常则执行下面第2步。
2、防火墙
如果机器上安装有放火墙,可能是服务器端口号屏蔽而造成的。关闭防火墙后,尝试重新连接。
仍然不行则执行第3步。
3、数据库监听器未启动 修改PC上注册表中的ImagePath值。
下面以ORACLE数据库为例
重新手动启动数据库监听:
1:开始 → 运行→ 输入CMD→ 进入DOS命令提示界面
d:>lsnrctl
LSNRCTL> status
或者
LSNRCTL> start
如果是类似图片中的信息
恭喜,你的问题已经查找出来,是数据库监听器未启动而造成的。
以下是手动启动数据库的方法:
在运行处执行regedit进入注册表到
开始 →运行→ regedit
按下面路径
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleOraHome90TNSListener
找到OracleOraHome90TNSListener(我用的是Oracle9i 其他的版本的应该是OracleOraHomexxxTNSListener)
找到之后你会发现ImagePath关键值不存在了,创建它:(存在的话,点击修改,修改方法在下文有介绍)
右键单击,弹出菜单选择新键(N)→字符串值(S)
将其命名为ImagePath
选中ImagePath点右键,选中修改:
在值中输入你的Oracle安装目录\ora90(其他版本对应的是oraxxx目录)\bin\tnslsnr
确定后退出注册表:
再在DOS命令下键入start
如果出现下面画面,恭喜你,监听器启动成功:
关闭DOS,启动你的程序进行测试,应该恢复正常了。 以上就是3中常见的引发The Network Adapter could not establish the connection 异常的原因。
- Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connec
- Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connectio
- Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connect
- 使用Oracle连接池错误 Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connection )的解决方法
- Cannot create PoolableConnectionFactory (The Network Adapter could not establish the connection)
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
- The Network Adapter could not establish the connec
- 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
- 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
- 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
- 使用easyUI 格式化datagrid列
- 关于IE中出现的内存不能为written问题的解决方法
- 各种隐藏 WebShell、创建、删除畸形目录、特殊文件名、黑帽SEO作弊
- 复制
- C# 创建调用存储过程
- Cannot create PoolableConnectionFactory(Io 异常: The Network Adapter could not establish the connec
- Memcached 集群架构方面的问题
- typedef的用途之一---为复杂声明定义一个简单的别名
- 百度搜索URL参数含义
- Android内存管理机制之一:lowmemory killer
- 图解卸载eclipse插件的标准方法
- Unix编程之size_t、ssize_t .
- Exadata是什么?
- 警惕利用类的构造和析构函数来做资源分配释放时候,对临时变量的使用