IO 错误:网络适配器无法建立连接 [英] IO Error: The Network Adapter could not establish the connection

查看:101
本文介绍了IO 错误:网络适配器无法建立连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Oracle 的新手,正在尝试使用 Java 运行一个简单的示例代码,但是在执行代码时出现此错误..我能够通过 CMD 启动侦听器,也能够运行 SQL Plus.谁能帮我一下,告诉我我可能做错了什么?

I am new to Oracle, and am trying to run a simple example code with Java, but am getting this error when executing the code.. I am able to start up the listener via CMD and am also able to run SQL Plus. Can anyone give me a hand and tell me what I might be doing wrong?

更新:我正在使用 JDBC.

Update: I am using JDBC.

数据库是本地的,我实际上可以使用它,但它就在今天停止工作.我不太确定为什么.你介意给我一些程序来遵循,因为我知道的不多.

Database is local, and I actually had it working but it stopped working just today. I'm not really sure why though. Would you mind giving me some procedures to follow by since I don't know much.

推荐答案

要么:

  1. 数据库没有运行
  2. 您输入的网址错误
  3. 路上有防火墙.

(这个奇怪的错误信息是由 Oracle 的 JDBC 驱动程序在无法连接到数据库服务器时产生的.网络适配器"似乎指的是他们代码的某些组件,这不是很有用.真正的网络适配器(NIC) 根本不建立连接:TCP 协议栈会这样做.如果他们只是让原始 ConnectException 被抛出,或者至少使用它的错误消息和让它出现在堆栈跟踪中.)

(This strange error message is produced by Oracle's JDBC driver when it can't connect to the database server. 'Network adapter' appears to refer to some component of their code, which isn't very useful. Real network adapters (NICs) don't establish connections at all: TCP protocol stacks do that. It would have been a lot more useful if they had just let the original ConnectException be thrown, or at least used its error message and let it appear in the stack trace.)

这篇关于IO 错误:网络适配器无法建立连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆