Home > database >  Connect The oracle database show that The Network Adapter could not establish The connection
Connect The oracle database show that The Network Adapter could not establish The connection

Time:10-14

I am writing to connect to the database code in Eclipse, database connection address is this:
 String url="JDBC: oracle: thin: @ localhost: 1521: wouldn"; 


Most of the time connect to the database is normal, but sometimes have to update the computer, or feel isn't a computer for a long time, after again connection there may appear the following error:
Java. SQL. SQLRecoverableException: IO error: The Network Adapter could not establish The connection
At oracle, the JDBC driver. T4CConnection. Logon (T4CConnection. Java: 458)
At oracle, the JDBC driver. PhysicalConnection. & lt; init> (PhysicalConnection. Java: 546)
At oracle, the JDBC driver. T4CConnection. & lt; init> (T4CConnection. Java: 236)
At oracle, the JDBC driver. T4CDriverExtension. GetConnection (T4CDriverExtension. Java: 32)
At oracle, the JDBC driver. OracleDriver. Connect (OracleDriver. Java: 521)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 571)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 215)
The at edu. Seu. Database. Drivers. DatabaseConnection. & lt; init> (DatabaseConnection. Java: 35)
The at edu. Seu. Database. Drivers. DatabaseTableSelector. GetDBGroupMember (DatabaseTableSelector. Java: 97)
The at edu. Seu. Database. Drivers. DatabaseTableSelector. GetData (DatabaseTableSelector. Java: 42)
The at edu. Seu. Lizhenglong. Mylabperspective. MyLabPerspectiveTopComponent $MySwingWorker. DoInBackground (MyLabPerspectiveTopComponent. Java: 239)
The at edu. Seu. Lizhenglong. Mylabperspective. MyLabPerspectiveTopComponent $MySwingWorker. DoInBackground (MyLabPerspectiveTopComponent. Java: 231)
The at javax.mail. Swing. The SwingWorker $1. Call (296) SwingWorker. Java:
The at Java. Util. Concurrent. FutureTask. Run (FutureTask. Java: 262)
The at javax.mail. Swing. SwingWorker. Run (SwingWorker. Java: 335)
The at Java. Util. Concurrent. ThreadPoolExecutor. RunWorker (ThreadPoolExecutor. Java: 1145)
The at Java. Util. Concurrent. ThreadPoolExecutor $Worker. The run (ThreadPoolExecutor. Java: 615)
The at Java. Lang. Thread. The run (Thread. Java: 745)
Under Caused by: oracle.net.ns.NetException: The Network Adapter could not establish The connection
At oracle.net.nt.ConnStrategy.execute ConnStrategy. Java: (392)
At oracle.net.resolver.AddrResolution.resolveAndExecute AddrResolution. Java: (434)
At oracle.net.ns.NSProtocol.establishConnection NSProtocol. Java: (687)
At oracle.net.ns.NSProtocol.connect NSProtocol. Java: (247)
At oracle, the JDBC driver. T4CConnection. Connect (T4CConnection. Java: 1102)
At oracle, the JDBC driver. T4CConnection. Logon (T4CConnection. Java: 320)
. 17 more
Under Caused by: java.net.ConnectException: Connection refused: connect
The at java.net.DualStackPlainSocketImpl.waitForConnect (Native Method)
At java.net.DualStackPlainSocketImpl.socketConnect DualStackPlainSocketImpl. Java: (85)
At java.net.AbstractPlainSocketImpl.doConnect AbstractPlainSocketImpl. Java: (339)
At java.net.AbstractPlainSocketImpl.connectToAddress AbstractPlainSocketImpl. Java: (200)
At java.net.AbstractPlainSocketImpl.connect AbstractPlainSocketImpl. Java: (182)
At java.net.PlainSocketImpl.connect PlainSocketImpl. Java: (172)
At java.net.SocksSocketImpl.connect SocksSocketImpl. Java: (392)
At java.net.Socket.connect (579) Socket. Java:
At oracle.net.nt.TcpNTAdapter.connect TcpNTAdapter. Java: (150)
At oracle.net.nt.ConnOption.connect ConnOption. Java: (133)
At oracle.net.nt.ConnStrategy.execute ConnStrategy. Java: (370)
. 22 more

At that time, or with other software with oracle database SQL PLUS can normal landing database, but it can't connect with code,
If choose to restart the computer, and connected to the database properly,
I don't know appear this kind of circumstance is because what reason?

CodePudding user response:

You try to put the network adapter is disabled, enabled again, and see if I can solve;

CodePudding user response:

Check the network and system firewall

CodePudding user response:

First will ping ping, if we can ping, then check the network, can't check the system again after firewall

CodePudding user response:

Import the jar package?

CodePudding user response:

Listening to restart
  • Related