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

查看:755
本文介绍了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天全站免登陆