Abnormal java.sql.sqlexception: Io Exception: The Network Adapter Could Not Establish Connection

xiaoxiao2021-03-06  86

Oracle Database Connection (from oracle.com)

Problem

You are attempting to connect to an an oracle instance using jdbc and you are receiving the following error.

Java.sql.sqlexception: IO Exception:

The Network Adapter Could Not Establish Connection

SQLEXCEPTION: SQLSTATE (NULL) VENDOR CODE (17002)

Any or All of the Following Conditions May Also Apply:

1) You are able to establish a SQL * Plus Connection from the Same

Client to the same oracle instance.

2) You are able to establish a JDBC OCI Connection, But Not a Thin

Connection from the Same Client to the Same Oracle Instance.

3) The Same JDBC Application IS Able To Connect from A Different

Client to the same oracle instance.

4) The Same Behavior Applies WHETHER THE INITIAL JDBC Connection

String Specifies a hostname or an ip address.

Rediscovery

To verify whether you are hitting this problem, verify whether the Oracle instance is configured for Multithreaded Server (MTS). If the Oracle instance is not configured for MTS, you are probably encountering a different problem. Otherwise, continue. Try forcing the JDBC connection to use a dedicated server instead of a shared server. This can be accomplished in several ways. for JDBC OCI or Thin, this can be done by reconfiguring the server for dedicated connections only. This approach, however, may not be feasible in many cases In Such Cases, The Following Options Apply: for JDBC OCI:

1) Add the TNS Connect String of Add THE (Server = Dedicated)

Stored in The Tnsnames.ora File on the client.

2) set the user_dedicated_server = on in SqlNet.ora on the client.

转载请注明原文地址:https://www.9cbs.com/read-107860.html

New Post(0)