Io exception: the network adapter cocould not establish the connection

Source: Internet
Author: User

The exception is as follows:

Org. Apache. commons. DBCP. sqlnestedexception: cannot create poolableconnectionfactory (IO exception: the network adapter cocould not establish the connection)
At org. Apache. commons. DBCP. basicdatasource. createdatasource (basicdatasource. Java: 1225)
At org. Apache. commons. DBCP. basicdatasource. getconnection (basicdatasource. Java: 880)
 Caused by: Java. SQL. sqlexception: Io exception: the network adapter cocould not establish the connection
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 180)
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 222)
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 335)
 

Main reasons:

1. The datasource configuration of the server. xml file may be incorrect.

(1 ). if data on the local machine is used, the configuration in the local data source is: username = "pcisv62" Password = "11" url = "JDBC: oracle: thin :@Localhost: 1521:Orcl"
(2 ). if the data on the server is used, the configuration in the data source is: username = "pcisv62" Password = "11" url = "JDBC: oracle: thin :@Dbserver: 1521:Corev6"

(Dbserver is the name of the server, and corev6 is the SID of Oracle on the server)

2. The configuration of the tnsnames. ora file of Oracle may be incorrect.

Oracle installation directory e: \ oracle \ ora92 \ Network \ ADMIN tnsnames. ora:
Local Configuration:
Orcl =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host =Host Name) (Port = 1521 ))
)
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME =Orcl)
)
)
Or Server Configuration:
Corev6_dbserver =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host =Dbserver) (Port = 1521 ))
)
(CONNECT_DATA =
(SID =Corev6)
(Server = dedicated)
)
)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.